Permalink
Browse files

Style changes.

  • Loading branch information...
1 parent 2a2d932 commit a2a5ae7b680ac0c2f2b4ec38e482cb683a29cec7 @egan committed Dec 30, 2011
Showing with 11 additions and 8 deletions.
  1. +11 −8 dpmstoggle.sh
View
@@ -1,26 +1,29 @@
#!/bin/bash
##
-# dpmstoggle.sh -- toggle dpms and X screen blanking
+# dpmstoggle.sh -- toggle dpms and X screen blanking
#
-# usage -- dpmstoggle.sh
+# usage -- dpmstoggle.sh
#
-# written -- 13 July, 2011 by Egan McComb
+# notes -- designed for use from window manager
+# -- determines dpms status using lockfile
#
-# revised --
+# written -- 13 July, 2011 by Egan McComb
+#
+# revised --
##
-lockfile=/tmp/dpms.lock
+lockfile="/tmp/dpms.lock"
-if [ ! -e $lockfile ]
+if [[ ! -e "$lockfile" ]]
then
xset -dpms
xset s off
- touch $lockfile
+ touch "$lockfile"
else
xset +dpms
xset s on
- rm $lockfile
+ rm "$lockfile"
fi
exit 0

0 comments on commit a2a5ae7

Please sign in to comment.