View Single Post
Posts: 21 | Thanked: 6 times | Joined on Apr 2010
#24
Hi! I asked in http://talk.maemo.org/showthread.php?p=682089 if there is a setting to get Exchange auto sync only when WiFi, manual otherwise. But as I did'nt get an answer maybe there is'nt, so I will try to make it work with Fcron.

Something like:
If "WiFi connected = Yes" and "charging cellphone =Yes" then "Peak schedule = Every 15 min"

I guess the "Peak schedule = Every 15 min" can be solved with something like this: http://wiki.maemo.org/Fcron#Update_e-mail

I tried to find answers at http://wiki.maemo.org/Fcron and http://wiki.maemo.org/Phone_control , but cant find answers to these two:
1. How can I check if "WiFi connected = Yes"
2. How can I check if "charging cellphone =Yes"

Any tips on how I can find out the answer?

PS.
Originally Posted by eiraku View Post
Anyway, is there any way a script can be created that shows a hildon notification "Reboot in 10s" before the N900 actually reboots? Through DBUS? How?
I'm not that good at this, but i would try to write a script with something like this (from http://wiki.maemo.org/Fcron#Update_e-mail ):
Code:
#!/bin/sh
run-standalone.sh dbus-send --type=method_call --dest=org.freedesktop.Notifications /org/freedesktop/Notifications org.freedesktop.Notifications.SystemNoteInfoprint string:"Reboot in 10s..."
sleep 10
reboot

Last edited by raffe; 2010-05-27 at 11:04.