A cheap alarm clock

alarm-clock-iconThis is how to build an alarm clock using the Linux at command.
It also uses the mplayer command line utility which can/must be installed.

Firstly, we need an mp3 song to be stored in a user’s directory. Let’s assume that it’s the ~/Music/Celesta.mp3 file.
Then, I’ll use the { mplayer -really-quiet ~/Music/Celesta.mp3; } & command so the song be played in the background in its own shell { } and leave space for the next command (notify-send "Wake up" "$(date +%R)\nIt's about time" -i face-wink) to display the notification.

at 21:45
warning: commands will be executed using /bin/sh
at> { mplayer -really-quiet ~/Music/Celesta.mp3; } &
at> notify-send "Wake up" "$(date +%R)\nIt's about time" -i face-wink
at> <EOT>

The <EOT> is the Ctlr-D keystroke.


A list with the stock-icon-names e.g. face-wink can be found with the command: ls /usr/share/icons/gnome/32x32/emotes/

sudo pacman -S at
sudo systemctl enable atd
sudo systemctl start atd


  1. Manpage: mplayer2

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s