-
-
Save cdimartino/3168099 to your computer and use it in GitHub Desktop.
Things integrate with Pomodoro
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
-- End : Marking to-dos completed | |
tell application "Things" | |
tell list "Today" | |
set toDoToComplete to to do named "$pomodoroName" | |
set status of toDoToComplete to completed | |
set tag names of toDoToComplete to "⌘,✔" | |
end tell | |
move toDoToComplete to list "Next" | |
end tell | |
activate application "ScreenSaverEngine" | |
-- Interrupt over : Making to-dos canceled | |
tell application "Things" | |
tell list "Today" | |
set toDoToCancel to to do named "$pomodoroName" | |
set status of toDoToCancel to canceled | |
set tag names of toDoToCancel to "⌘,✘" | |
end tell | |
end tell | |
-- Start : work fine | |
tell application "Things" | |
try | |
tell list "Today" | |
try | |
set editToDo to to do named "$pomodoroName" | |
on error | |
set editToDo to to do named "One Session" | |
set name of editToDo to "$pomodoroName" | |
end try | |
end tell | |
on error | |
set newToDo to make new to do ¬ | |
with properties {name:"$pomodoroName",due date:current date} ¬ | |
at beginning of list "Today" | |
set tag names of newToDo to "⌘" | |
end try | |
end tell |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment