Jump to content
Sign in to follow this  
kopischke

Sleep Display command

Recommended Posts

Sleeping the Mac display is the fastest way to lock a machine if a password is set. Unlike switching to the login window (Alfred’s default strategy when using the lock command), all your apps keep running, enabling continuous operation of tools like DropboxHazel or EventScripts, and even quasi-magical unlocking with Knock (if that’s your thing). On a machine whose keyboard has an Eject key, Ctrl+Shift+Eject will do the trick, but on those without, only hot corners are available.

 

Sleep Display complements the inbuilt options by adding an Alfred keyword (sleepdisplay by default, though I prefer to disable standard locking and use lock) and an optional keyboard shortcut (unset by default). No more, no less.

 

Grab it here, or go to the repo here.

 

Changelog:

  • version 1.0.1 – fixed hotkey bringing up Alfred

 

NB: Mavericks only, as it uses a tool compiled with the 10.9 SDK.

Edited by kopischke

Share this post


Link to post

Great.. Thx a lot.

But what's the difference to  ./sleepDisplays 

 

Um, I’m not quite sure where you got the sleepDisplays command from? It’s not part of the default OS X set of CLI commands…

Share this post


Link to post

Great workflow, thanks!

 

One side note, I think the box for the hotkey should be positioned as in the image below.

The way it is now it still brings up alfred and you have to hit return after pressing the hotkey.

Screen%20Shot%202013-11-13%20at%2019.26.

Share this post


Link to post

Great workflow, thanks!

 

One side note, I think the box for the hotkey should be positioned as in the image below.

The way it is now it still brings up alfred and you have to hit return after pressing the hotkey.

Screen%20Shot%202013-11-13%20at%2019.26.

 

 Absolutely. Brainfart of mine, corrected. Re-download or update via Alleyoop.

Edited by kopischke

Share this post


Link to post

Great workflow, thanks kopischke!  :)

 

One question though, is it possible to adjust the workflow to sleep only one of multiple displays?  :huh:

 

Thing is, I have three displays hooked up my MacPro and I'd love to be able to sleep only one (or probable two) of those three displays using Alfred and your workflow.

 

Thanks again,

Dan

Share this post


Link to post

Sorry for not answering earlier, I haven’t been around the forums for a while… Short answer, I’m afraid, is no, not with this workflow, as the underlying utility does not support per monitor sleep. 

Share this post


Link to post

On a machine whose keyboard has an Eject key, Ctrl+Shift+Eject will do the trick, but on those without, only hot corners are available.

 

And on a machine without an Eject key. You can press Ctrl-Shift-Power which does the same trick. 

Share this post


Link to post

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Sign in to follow this  
×
×
  • Create New...