Created
May 17, 2016 08:25
-
-
Save pattex/37f00b50ff3f13f14cb2bfaead08c931 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
if [ -z "$1" ]; then | |
echo "Using arne's default offset for darjeeling in the daytime (3.5 minutes)." | |
echo "Otherwise specify your offset in seconds." | |
echo "\n\tteatime [seconds]\n" | |
offset=210 | |
else | |
offset=$1 | |
fi | |
target=$((`date +%s` + $offset)) | |
while [ "$target" -ge `date +%s` ]; do | |
echo -n "$(date -u --date @$(($target - `date +%s`)) +%H:%M:%S)\r" | |
sleep 1 | |
done | |
notify-send -u critical 'Teatime!' " {\n { }\n }_{ __{\n .-{ } }-.\n ( } { )\n |\`.. _____..-'|\n | ;--.\n | (__ \\n | | ) )\n | |/ /\n | / /\n | ( /\n \ y'\n \`-.._____..-'" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment