This is not much more than an "at" program for my Freerunner (Openmoko GTA02). It consists a python program and a shell script, which enables the user to set an alarm for the same or the next day. Example:
alarm 06:30
If it is before 06:30, this will set the alarm to go off at 06:30 on the same day. If it is after 06:30, this will set the alarm on the next day. To be on the safe side, the program prints the target date and time.
At the alarm time, the phone will wake from suspend (arranged by the at daemon atd) and run a predefined shell script. I have set this shell script to call mplayer with my favourite mp3 as a parameter :-)
I have put the files in /home/root and linked to the alarm script with:
ln -s /home/root/alarm /usr/bin/alarm
mplayer by hand.
atd, it obviously needs to be installed. In my distribution (SHR = FSO with some apps), it is not in the official feeds, but can be downloaded from the angstrom repository.
The ZIP-archive with the files can be downloaded here. Don't forget to install atd, otherwise it won't work.
© 2009 by David Madl. Impressum | Home (English) | Home (Deutsch) | Processing time: 0.191 s | IPv4
Write a comment
The fields e-mail and website are optional. Your e-mail-address will not be displayed, it's only for me to be able to reply.