Skip to content

Instantly share code, notes, and snippets.

@boffbowsh
Created August 23, 2013 10:32
Show Gist options
  • Select an option

  • Save boffbowsh/6317845 to your computer and use it in GitHub Desktop.

Select an option

Save boffbowsh/6317845 to your computer and use it in GitHub Desktop.
#!/bin/bash
test -f ~/.pomodoro || exit
FIGLET="/usr/local/bin/figlet -Wf banner3"
diff=$(($(stat -f%m ~/.pomodoro) + (25*60) - $(date +"%s")))
if [[ $diff -lt 0 && $diff -gt -15 ]]; then
echo "0:00" | $FIGLET
elif [[ $diff -gt 0 ]]; then
printf "%i:%02i" $((diff/60)) $((diff%60)) | $FIGLET
fi
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment