-
-
Save danielcosta/993b96e044ec65ee1aa5 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/bash | |
# POMODORO | |
# usage: pomo | pomo short | pomo long | |
SLEEPTIME=1500 | |
TITLE="POMODOR0 :)" | |
SUBTITLE="Take a Break :)" | |
if [ "$1" = "long" ]; then | |
SLEEPTIME=900 | |
TITLE="LONG BREAK FINISH" | |
SUBTITLE="Back to Work :P" | |
elif [ "$1" = "short" ]; then | |
SLEEPTIME=300 | |
TITLE="SHORT BREAK FINISH" | |
SUBTITLE="Back to Work :P" | |
fi | |
if [ "$(uname)" == "Darwin" ]; then | |
echo "Pomodoro - MacOS version"; | |
eval "(sleep $SLEEPTIME && terminal-notifier -message '$SUBTITLE' -title 'Pomodoro' --subtitle '$TITLE' &)" | |
elif [ "$(expr substr $(uname -s) 1 5)" == "Linux" ]; then | |
echo "Pomodoro - Linux version"; | |
eval "(sleep $SLEEPTIME && notify-send '$TITLE' '$SUBTITLE' --icon=dialog-information &)" | |
else | |
echo "Unsupported operating system"; | |
fi |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment