Skip to content

Instantly share code, notes, and snippets.

@hamsolodev
Created August 27, 2011 08:08
Show Gist options
  • Save hamsolodev/1175125 to your computer and use it in GitHub Desktop.
Save hamsolodev/1175125 to your computer and use it in GitHub Desktop.
stupidly simple starting & stopping of Pomodoro from commandline
# use AppleScript to communicate with the Pomodoro application on OSX
function pom {
case $1 in
start)
osascript -e "tell app \"Pomodoro\" to start \"${*}\" duration 25 break 5"
;;
stop)
osascript -e "tell app \"Pomodoro\" to reset"
;;
pause)
osascript -e "tell app \"Pomodoro\" to external interrupt"
;;
resume)
osascript -e "tell app \"Pomodoro\" to resume"
;;
*)
echo "${0} {start task desc…|stop|pause|resume}"
esac
}
@hamsolodev
Copy link
Author

just need to avoid including "start" in the pomodoro description

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment