Skip to content

Instantly share code, notes, and snippets.

@MasseR
Created January 7, 2013 06:07
Show Gist options
  • Save MasseR/4472840 to your computer and use it in GitHub Desktop.
Save MasseR/4472840 to your computer and use it in GitHub Desktop.
Simple tea timer
#!/bin/bash
start=$1
now=$(date +%s)
remaining=$(($start - ($(date +%s) - $now)))
while [ $remaining -gt 0 ]; do
echo -ne "\r\033[K$remaining"
sleep 1;
remaining=$(($start - ($(date +%s) - $now)))
done
notify-send "Tea" "Tea"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment