Skip to content

Instantly share code, notes, and snippets.

@yaauie
Created September 17, 2013 17:26
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save yaauie/6597593 to your computer and use it in GitHub Desktop.
Save yaauie/6597593 to your computer and use it in GitHub Desktop.
On a Mac, this script will suspend your user session, locking your computer and bring up the user-switcher without logging you out. I use it in combination with a Quicksilver trigger to be activated on keystroke (⌥⌘L).
#!/bin/sh
/System/Library/CoreServices/Menu\ Extras/User.menu/Contents/Resources/CGSession -suspend
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment