Jump to content

Sleep Display command


Recommended Posts

Posted (edited)

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
Posted

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…

Posted

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.

Posted (edited)

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
  • 2 weeks later...
Posted

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

  • 4 weeks later...
Posted

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. 

  • 2 weeks later...
Posted

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. 

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...