Created
January 31, 2020 16:26
-
-
Save deanmalan/91d733719404c4b9a226b6b284e66e6f to your computer and use it in GitHub Desktop.
Bash Pomodoro-style timer for Ubuntu
This file contains hidden or 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 | |
# Pomodoro-style timer for Ubuntu | |
# Usage `pomodoro [WORK DURATION] [SHORT BREAK DURATION] [LONG BREAK DURATION] | |
while true | |
do | |
for i in {1..4} | |
do | |
sleep ${1:-25m} | |
notify-send "Time to take a short break" | |
sleep ${2:-5m} | |
notify-send "Time to get back to work" | |
done | |
notify-send "Time for a long break" | |
sleep ${3:-15m} | |
notify-send "Time to work" | |
done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
I hadn't thought about adding a loop to mine. Here's mine, because on XFCE notification popups are not that visible, I added sounds. I now like it even more, in fact:
The first notify-send serves as a visual reminder that the script is running, it's useful when launching from a keyboard shortcut. It plays bell sounds every 5 minutes until competing 15 minute (my preferred time for pomodoros)