Active Topics

 


Reply
Thread Tools
Posts: 47 | Thanked: 37 times | Joined on Aug 2015
#1
Hey!

I've been in the N900 frenzy ever since I got it as my first touch device. I cannot stop tempering with it and experimenting with its usefulness. For a while I've been using it as a "bedside clock" - with several other options than just showing the time of course. Attached stereo speakers, constant WIFI and weather forecast, just to name the most obvious.

So, I've had it constantly showing a big "digital clock" and "ForecaWeather" next to it. Awesome setup - with one flaw: The displayed weather updates are extremely delayed when the screen is constantly on. A soon as I slide the screen or push the volume button it updates.

What can I do to display the latest weather updates without me having to push something?

I was thinking of alarmd - or alarmed - but I couldn't come up with a way to program it properly. I also tried a slideshow to keep the screen active, but it didn't help.

Glad about any advice!
 
Posts: 578 | Thanked: 994 times | Joined on Dec 2012
#2
Maybe try to use xdotool to simulate mouse moves. Example:
watch -n60 ./movemouse.sh - it will execute script every 60 seconds
movemouse.sh contains:
xdotool mousemove 100 100; xdotool mousedown 1; xdotool mousemove 200 100; xdotool mouseup 1

Last edited by elros34; 2015-08-09 at 19:17.
 

The Following 2 Users Say Thank You to elros34 For This Useful Post:
pichlo's Avatar
Posts: 6,447 | Thanked: 20,981 times | Joined on Sep 2012 @ UK
#3
But, isn't mouse movement the opposite of what the OP wants? It will prevent the screen blanking - but the OP's screen is already always on, which is apparently the problem, because the weather widget updates only when the screen comes back on from blanked.

TBH, I have never had a chance to try that. There is a setting in Foreca how frequently the widget should update and 'manual ' is one of the options. It seems that either the regular updates do not work for the OP or they are not frequent enough for him/her.

Perhaps someone will come up with a better suggestion but until then, here is a crude, quick-and-dirty one. There is a file, /home/user/.config/hildon-desktop/home.plugins, containing the list of active widgets. Delete the entry for the Foreca widget and save the file, then go back to the home screen: the widget is gone. Restore the file to its former glory and save: the widget comes back, empty, starts initializing. If you do not mind the widget flicking out of and back into existence from time to time, you might be able to automate the process through some cron job.
 

The Following 2 Users Say Thank You to pichlo For This Useful Post:
Posts: 47 | Thanked: 37 times | Joined on Aug 2015
#4
Thank you two for these helpful tips! I tried elros' one, but for some reason I don't get the right to run the script! Next I will try pichlo's advice - I actually like its crudity . Have to get used to cron first, though.
 
Posts: 47 | Thanked: 37 times | Joined on Aug 2015
#5
Sadly, neither worked out for me... xdotool seems not really well suited for the N900. Apparently the mouse can be on different desktops and moving it causes not always the action that I expect. Confusing.
Deleting the entry in the config file caused ALL the widgets to disappear, replaced by the out-of-the-box ones.
Bummer. Thanks a lot though!
 
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:
Reply


 
Forum Jump


All times are GMT. The time now is 11:37.