Never been to TextSnippets before?

Snippets is a public source code repository. Easily build up your personal collection of code snippets, categorize them with tags / keywords, and share them with the world (or not, you can keep them private!)

power off the displays (See related posts)

this really powers off the displays, unlike other solutions which just put them to the dimmest setting
#!/bin/sh
  
MAGIC_NUMBER=107374183
PMSET=/usr/bin/pmset
GREP=/usr/bin/grep
AWK=/usr/bin/awk
SLEEP=/bin/sleep
    
$PMSET force -a displaysleep $MAGIC_NUMBER
$SLEEP 1
$PMSET force -a displaysleep `$PMSET -g | $GREP displaysleep | $AWK '{print $2}'`
$SLEEP 1

Comments on this post

Araxia posts on May 29, 2007 at 17:36
This is awesome. I have been wanting to be able to do this for ages. How did you find this magic number?

You need to create an account or log in to post comments to this site.


Related Posts