Last active
December 24, 2015 06:19
-
-
Save sttts/6756301 to your computer and use it in GitHub Desktop.
Using terminal-notifier the script shows persistent notification center messages for all flagged OmniFocus tasks. Possible, in the notification center preferences one needs to configure the OmniFocus message properly.
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
tell application id "OFOC" | |
tell default document | |
set today to current date | |
set lstTasks to flattened tasks where ((flagged is true and blocked is false) or (due date is not missing value and due date < today)) and completed is false | |
repeat with oTask in lstTasks | |
set theName to name of oTask | |
set theId to id of oTask | |
my notify(theName, "", "omnifocus:///task/" & theId, theId) | |
end repeat | |
end tell | |
end tell | |
on notify(theTitle, theDescription, theUrl, theId) | |
do shell script "/usr/bin/terminal-notifier -sender com.omnigroup.OmniFocus -title \"" & theTitle & "\" " & "-message \"" & theDescription & "\" -group \"" & theId & "\" -open \"" & theUrl & "\"" | |
end notify |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment