View Single Post
Posts: 48 | Thanked: 85 times | Joined on Feb 2010
#9
Hi guys,
here I reverse engineered the clockd, to disable clock alarms in vacations.
I have a calendar database added to maemo calendar to know local vacations, using informations of this database my script to disable the clock alarm that respond a specific name.
My solution needs of some tuning actions.
First you need to add a work alarm for your specific working days (e.g. Mon-Fry), and to call it with a specific name (e.g. "work alarm") that you will use in the script "tilafestapiccaniresta.sh".
Later you need to see the flag that results activating and deactivating this specific alarm in the file /var/cache/alarmd/alarm_queue.ini:
cat /var/cache/alarmd/alarm_queue.ini|grep -A 6 -B6 -i "work alarm"
The two number you found must be used in the file "change_flag_alarm.sh" (active_flag and deactive_flag).
And finally you need a calendar database file to add holidays to your calendar (this calendar database must contain the word "holidays" in the name).
The script that change the flag of the alarm can send an email by wget query if you create a php site to manage this (working example provided).

PS: It can be some translation error, I rapidly changed the language to English. You need to install sqlite3. You can decide if the entire August is vacations (for those that like me work in academic places).

Enjoy!!!
Attached Files
File Type: zip alarm.zip (3.6 KB, 170 views)

Last edited by Ilmanowar; 2015-08-20 at 11:15.