Skip to content

Instantly share code, notes, and snippets.

@thisivan
Created February 12, 2011 07:05
Show Gist options
  • Save thisivan/823572 to your computer and use it in GitHub Desktop.
Save thisivan/823572 to your computer and use it in GitHub Desktop.
Concentrate (http://getconcentrating.com) Pomodoro AppleScripts
(* Setup this script to run when a "Pomodoro" activity has finished. It will start either "Pomodoro Break" or "Pomodoro Long Break" when finished *)
set activity1 to "Pomodoro Break"
set activity2 to "Pomodoro Long Break"
set button3 to "Stop Working"
set dialogText to "What do you want to do now?"
set dialogTitle to "Choose your next step..."
set giveUp to 360
set button1 to activity1
set button2 to activity2
tell application "Concentrate"
set andNow to display dialog dialogText buttons {button1, button2, button3} default button 1 with title dialogTitle with icon 1 giving up after giveUp
set nowDo to button returned of andNow
if nowDo is equal to button1 then
tell activity activity1
concentrate
end tell
else if nowDo is equal to button2 then
tell activity activity2
concentrate
end tell
else
return
end if
end tell
(* Setup this script to run when a "Pomodoro Break" or "Pomodoro Long Break" activity has finished. It will start either "Pomodoro" or "Pomodoro Long Break" when finished *)
set activity1 to "Pomodoro"
set activity2 to "Pomodoro Long Break"
set button3 to "Stop Working"
set dialogText to "Ready for another one?"
set dialogTitle to "Choose your next step..."
set giveUp to 360
set button1 to activity1
set button2 to activity2
tell application "Concentrate"
set andNow to display dialog dialogText buttons {button1, button2, button3} default button 1 with title dialogTitle with icon 1 giving up after giveUp
set nowDo to button returned of andNow
if nowDo is equal to button1 then
tell activity activity1
concentrate
end tell
else if nowDo is equal to button2 then
tell activity activity2
concentrate
end tell
else
return
end if
end tell
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment