Skip to content

Instantly share code, notes, and snippets.

@githubutilities
Created July 16, 2015 06:28
Show Gist options
  • Select an option

  • Save githubutilities/84d140c91fc2470fdc96 to your computer and use it in GitHub Desktop.

Select an option

Save githubutilities/84d140c91fc2470fdc96 to your computer and use it in GitHub Desktop.
Lockscreen in Mac

Lockscreen in Mac

  • add the following script to your bash_profile
alias lockscreen='/System/Library/CoreServices/"Menu Extras"/User.menu/Contents/Resources/CGSession -suspend'
  • use Alfred and just type lock in the search box
  • compiler the code and run ./lockscreen, please refer to here
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment