When I used Alfred's Lock command my mac locks and shows a screen with a password prompt. I want to know if I can do this on machines that don't have Alfred installed. Is there a way to do by perhaps creating an automator service?
Asked
Active
Viewed 107 times
1
1 Answers
1
You can create an Automator workflow with a Run Shell Script action containing:
/System/Library/CoreServices/Menu\ Extras/User.menu/Contents/Resources/CGSession -suspend
grg
- 201,078
-
@user3439894 All Automator documents are workflows, a service is still a workflow; the question did not specify a keyboard shortcut had to be used. I did not see your comment likely because I had this question open prior to your comment and didn't load them before posting my answer. – grg Dec 21 '16 at 18:23
/System/Library/CoreServices/"Menu Extras"/User.menu/Contents/Resources/CGSession -suspendin a Run Shell Script action in an Automator Service and assign it a keyboard shortcut or use it in an AppleScript script from the AppleScript menu on the Apple menu bar or and AppleScript app or a bash script wrapped with Platypus, etc. Have a look at: How to lock your Mac screen with a keyboard shortcut – user3439894 Dec 21 '16 at 17:31