Skip to content

Commit

Permalink
Add old lock command back as "switch user"
Browse files Browse the repository at this point in the history
This should keep people happy who relied on the old behaviour, and provide new functionality for those who don't.
Translations are unfortunately needed though for german and french.
  • Loading branch information
cHemingway committed May 6, 2015
1 parent 63346b0 commit 6b723c5
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 0 deletions.
1 change: 1 addition & 0 deletions PluginDirectories/1/shutdown.bundle/examples.txt
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ screen_saver(ssaver)
screen_saver(screen saver)
screen_saver(start screensaver)
lock_command(lock)
switch_user_command(switch user)
shutdown_command(shutdown)
shutdown_command(shut down)
logout_command(logout)
Expand Down
6 changes: 6 additions & 0 deletions PluginDirectories/1/shutdown.bundle/plugin.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,12 @@ def results(parsed, original_query):
"run_args": ["",True] # **kwargs doesn't work so use argument positions.
}

if ("switch_user_command" in parsed):
return {
"title": i18n.localstr('Switch User'),
"run_args": ["/System/Library/CoreServices/Menu\ Extras/User.menu/Contents/Resources/CGSession -suspend"]
}

if ('restart_command' in parsed):
return {
"title": i18n.localstr('Restart Mac'),
Expand Down

0 comments on commit 6b723c5

Please sign in to comment.