Skip to content

Commit

Permalink
New Action: OmniFocus Perspective
Browse files Browse the repository at this point in the history
Opens one of your Perspectives with LaunchBar. Mr. Perspective is going to dig this. A lot.

Hey, Sven! If you can read this. Love you, man!
  • Loading branch information
Andreas Zeitler committed Dec 10, 2015
1 parent 7b6be38 commit 0e8ce2f
Show file tree
Hide file tree
Showing 6 changed files with 77 additions and 0 deletions.
@@ -0,0 +1,45 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>CFBundleIconFile</key>
<string>OF Perspective Icon</string>
<key>CFBundleIdentifier</key>
<string>com.yourcompany.LaunchBar.action.OmniFocusPerspective</string>
<key>CFBundleName</key>
<string>OmniFocus Perspective</string>
<key>CFBundleVersion</key>
<string>1.0</string>
<key>LBDescription</key>
<dict>
<key>LBAuthor</key>
<string>Andreas Zeitler</string>
<key>LBEmail</key>
<string>azeitler@zettt.de</string>
<key>LBSummary</key>
<string>Opens an OmniFocus Perspective with LaunchBar.</string>
<key>LBTwitter</key>
<string>@zettt</string>
<key>LBWebsite</key>
<string>macosxscreencasts.com</string>
</dict>
<key>LBScripts</key>
<dict>
<key>LBDefaultScript</key>
<dict>
<key>LBAcceptedArgumentTypes</key>
<array>
<string>string</string>
</array>
<key>LBKeepWindowActive</key>
<true/>
<key>LBResultType</key>
<string>unknown</string>
<key>LBReturnsResult</key>
<true/>
<key>LBScriptName</key>
<string>default.applescript</string>
</dict>
</dict>
</dict>
</plist>
Binary file not shown.
Binary file not shown.
Binary file not shown.
@@ -0,0 +1,32 @@
(*
Open OmniFocus Perspectvie
This LaunchBar Action opens an OmniFocus Perspective directly
Icon used is from Josh Hughes
https://github.com/deaghean/omnifocus-perspective-icons
Created by Andreas "Zettt" Zeitler on 2015-12-10
Mac OS X Screencasts, zCasting 3000
*)
-- Changes
-- 1.0: Initial version.

-- return list of all perspectives (with a nice fancypants icon)
on run
set returnValue to {}

tell application "OmniFocus" to set perspectiveNames to perspective names

repeat with i in perspectiveNames
set thisPerspective to i as string
set returnValue to returnValue & [{title:thisPerspective, |url|:"omnifocus:///perspective/" & thisPerspective, icon:"OF Perspective Icon.pdf"}]
end repeat

return returnValue
end run

-- open perspective directly
-- note: this is case sensitive!
on handle_string(perspective)
open location "omnifocus:///perspective/" & perspective
end handle_string

0 comments on commit 0e8ce2f

Please sign in to comment.