Tag Archives: time

Countdown timer shell script

I made a small countdown script for the shell. It goes as follows:

Some tricks used in the script include:

  1. echo -ne "blah blah \r" was used to write in the same line over and over
  2. That 19800 is the time difference from GMT 0.0 in seconds. In Sri Lanka, it’s 5.30 hrs. Yes, we’re dealing with epoch time here, but still trying to figure out why we need to offset the time difference. :???:
  3. notify-send sends a desktop notification
  4. zenity --info pops up a message box

You can also add a sound to play with mplayer.