/countdown

A shell countdown timer

Primary LanguageShellGNU General Public License v3.0GPL-3.0

Countdown

A shell countdown timer that I display in my dwm status bar.

Features

  • Creates a temporary file so the current status can be used in other scripts (e.g. a dwm status bar).
  • Alerts the user with a notification.
  • Prevents multiple instances of the script running at once.

Optional dependencies

  • libnotify for notifications

Installation

  1. Clone the repository:
$ git clone https://github.com/joestandring/countdown
  1. Enter the directory:
$ cd countdown
  1. Allow running of the script:
$ chmod +x countdown.sh
  1. Optionally add it to a directory in the PATH like:
$ sudo cp countdown.sh /bin/
  1. Run the script:
$ ./countdown.sh

How to use

You can run countdown.sh with 3 arguments corresponding to hours, minutes, and seconds:

$ ./countdown.sh 1 30 5
1:30:5
1:30:4
1:30:3
...

Alternatively, if you run the script with less than 3 arguments, you will be prompted for the hours, minutes, and seconds:

$ ./countdown.sh
Hours: 1
Minutes: 30
Seconds: 5
1:30:5
1:30:4
1:30:3
...

If you want to stop the countdown, you can run

kill countdown.sh