Skip to content

Commit

Permalink
Merge pull request #63 from felipew/master
Browse files Browse the repository at this point in the history
Added screen saver option to the SHUTDOWN plugin
  • Loading branch information
nate-parrott committed Nov 17, 2014
2 parents 3803aeb + 69b8fa4 commit de603ed
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 1 deletion.
2 changes: 2 additions & 0 deletions PluginDirectories/1/shutdown.bundle/examples.txt
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
screen_saver(ssaver)
screen_saver(screen saver)
lock_command(lock)
shutdown_command(shutdown)
shutdown_command(shut down)
Expand Down
2 changes: 1 addition & 1 deletion PluginDirectories/1/shutdown.bundle/info.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,6 @@
"name": "shutdown",
"displayName": "Shutdown",
"description": "Provides additional commands such as shutdown, restart and logout",
"examples": ["shutdown", "restart", "logout", "sleep", "lock"],
"examples": ["shutdown", "restart", "logout", "sleep", "lock","screen saver"],
"categories": ["System", "Featured"]
}
6 changes: 6 additions & 0 deletions PluginDirectories/1/shutdown.bundle/plugin.py
Original file line number Diff line number Diff line change
Expand Up @@ -39,3 +39,9 @@ def results(parsed, original_query):
"title": "Empty the Trash",
"run_args": ["osascript -e 'tell app \"Finder\" to empty the trash'"]
}

if('screen_saver' in parsed):
return {
"title":"Turn on Screen Saver",
"run_args":["open -a /System/Library/Frameworks/ScreenSaver.framework/Versions/A/Resources/ScreenSaverEngine.app"]
}

0 comments on commit de603ed

Please sign in to comment.