How to setup a quick and simple console timer

archlinux-logo-dark-200dpi.b42bd35d5916  ratpoison_logo-60

If you using console a lot and don’t use any “fancy” desktop manager (I mostly use Ratpoison) and you need quick reminder, here is simple solution using sleep command:

$ sleep 180 && mplayer musicfile.mp3

…and it will start playing music after 180 seconds or you can pop up picture with:

$ sleep 180 && sxiv picture.jpg

…or in my case:

$ sleep 600 $$ ~./

…and it pops up Ratinfo. Here is my example of

DATE=$(echo -n $(date +%B,%d  %H:%M:%S ))
INFO=$(echo -n "Coffee is ready!!!!!
Date: $DATE")
ratpoison -c "echo $INFO"

…and it display “Coffee is ready!!!!!” with date and time beneath.


Comments are closed.