View Single Post
Posts: 47 | Thanked: 37 times | Joined on Aug 2015
#6
Correction: I got it!

Pichlo was right - I just did it wrong before. I guess when i editet the config file I used the wrong rights (root, I guess). That made the file inaccessible and a new one was created. That's at least my theory. I used my Ubuntu PC and worked over sftp and ssh, and I guess, that's usually with root rights.

So I did what Pichlo suggested - how DID you know that, anyway?!? - and made the file user-owned.

At first I thought I would overwrite the whole file periodically with another file to get the effect. But I figured that would create problems with future desktop alterations (new widgets, that is).

So I wrote a script that uses sed to delete the line, save it to file, wait a few seconds, paste it in again and save again. Right now I have it running with watch - every 30 minutes. Works like a charm. But since it's going to be a long-term setup, I will write that into the fcrontab. See below for the script.

Incredible, what time I spent getting xdotool to do the job - in vain. Hehe, what I actually managed is write a script that flicks the screen periodically, so the widget would wake up and refresh. It didnt'. FLICK THE SCREEN! The things you do... So I sat there, watching the screen until it made "flick", hoping the widget would reload. For quite a while. Don't tell anyone. Obne good thing came out of it, though. I also wrote a script that swipes the screen, switching to the next homescreen. Could be nice for the bedside-table or displaying stuff. Thanks for that, elros!

Why am I so focused on Foreca Weather? It displays several steps during one day. Additionaly, OMWeather shows several days. Sadly though, the Foreca widget cannot be scaled or the font or symbols editied. It's very small. So if you know a widget that does the same service, but is bigger, please let me know.

Thanks again, you two!

The config file "/home/user/.config/hildon-desktop/home.plugins"
Code:
[desktop-switcher.desktop-0]
X-Desktop-File=/usr/share/applications/hildon-home/desktop-switcher.desktop

[desktop-switcher.desktop-1]
X-Desktop-File=/usr/share/applications/hildon-home/desktop-switcher.desktop

[omweather-home.desktop-0]
X-Desktop-File=/usr/share/applications/hildon-home/omweather-home.desktop

[foreca-weather-applet.desktop-0]
X-Desktop-File=/usr/share/applications/hildon-home/foreca-weather-applet.desktop

[personal-ip-address.desktop-0]
X-Desktop-File=/usr/share/applications/hildon-home/personal-ip-address.desktop

[mediaplayerhomeapplet.desktop-0]
X-Desktop-File=/usr/share/applications/hildon-home/mediaplayerhomeapplet.desktop

[digiclockwidget.desktop-0]
X-Desktop-File=/usr/share/applications/hildon-home/digiclockwidget.desktop
The script "forecarefresh.sh"
Code:
#!/bin/sh
sed -i '/home\/foreca/d' /home/user/.config/hildon-desktop/home.plugins;
sleep 2;
sed -i '/\[foreca-weather-applet.desktop-0\]/a X-Desktop-File=/usr/share/applications/hildon-home/foreca-weather-applet.desktop' /home/user/.config/hildon-desktop/home.plugins
If the sleep is neccessary, I don't know. I just thought, the hardware could need a little extra time.
 

The Following User Says Thank You to sebar For This Useful Post: