abandoned bytes
Engineering: the art of making what you want from things you can get.

Console-based alarm clock application for Openmoko devices

April 13, 2009

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

The python "interface"

The python interface is a minimalistic pygtk application, which shows a full-screen button to cancel the alarm. I call this in the alarm shell script for exactly this reason - if the user is awake, he might probably not want to open up a terminal and kill mplayer by hand.

Prerequisites

As the alarm script is called by 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.

Download

The ZIP-archive with the files can be downloaded here. Don't forget to install atd, otherwise it won't work.

Comments

No comments yet. Why don't you write the first one?

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.

Name:
E-Mail:
Website:

Fill in the CAPTCHA to prove you are human:

© 2009 by David Madl. Impressum | Home (English) | Home (Deutsch) | Processing time: 0.191 s | IPv4

abandoned bytes (en) > Software > Openmoko > Console alarm
User:
Pass: