Skip to content

Instantly share code, notes, and snippets.

@danielcosta
Forked from mariorez/pomodoro-terminal.sh
Last active August 29, 2015 14:10
Show Gist options
  • Save danielcosta/993b96e044ec65ee1aa5 to your computer and use it in GitHub Desktop.
Save danielcosta/993b96e044ec65ee1aa5 to your computer and use it in GitHub Desktop.
#!/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