Skip to content

Instantly share code, notes, and snippets.

@masuidrive
Created February 4, 2009 09:45
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save masuidrive/58040 to your computer and use it in GitHub Desktop.
Save masuidrive/58040 to your computer and use it in GitHub Desktop.
#!/bin/sh
# /etc/pm/sleep.d/00zbright
COMMAND=/usr/local/bin/zbright
SAVED_FILE=/tmp/zbright.tmp
case "${1}" in
suspend|hibernate)
$COMMAND | /usr/bin/gawk '{print $2}' > $SAVED_FILE
;;
resume|thaw)
$COMMAND `/bin/cat $SAVED_FILE`
rm $SAVED_FILE
;;
esac
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment