Skip to content

Instantly share code, notes, and snippets.

@rtouze
Created January 15, 2020 20:05
Show Gist options
  • Save rtouze/224b0538dc048a97889ce1743f614c0c to your computer and use it in GitHub Desktop.
Save rtouze/224b0538dc048a97889ce1743f614c0c to your computer and use it in GitHub Desktop.
Simple pomodoro
# pomodoro aliases
alias PS="pomodoro_start"
alias PSB="pomodoro_short_break"
alias PLB="pomodoro_long_break"
SOUND_FILE=~/.config/Robot_blip-Marianne_Gagnon-120342607.mp3
pomodoro_start() {
echo "pomodoro start `date +%H:%M:%S`..."
sleep 1500
notify-send --urgency=critical "Poor man's pomodoro" "Time for a break"
cvlc --play-and-exit --quiet $SOUND_FILE > /dev/null 2>&1
echo "pomodoro end `date +%H:%M:%S`..."
}
pomodoro_short_break() {
echo "pomodoro break `date +%H:%M:%S`..."
sleep 180
notify-send --urgency=critical "Poor man's pomodoro" "Break over, go back to work"
cvlc --play-and-exit --quiet $SOUND_FILE > /dev/null 2>&1
echo "pomodoro end `date +%H:%M:%S`..."
}
pomodoro_long_break() {
echo "pomodoro long break `date +%H:%M:%S`..."
sleep 900
notify-send --urgency=critical "Poor man's pomodoro" "Long break over, go back to work"
cvlc --play-and-exit --quiet $SOUND_FILE > /dev/null 2>&1
echo "pomodoro end `date +%H:%M:%S`..."
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment