Added display script
authorEnrico Zini <enrico@enricozini.org>
Mon, 28 Sep 2009 15:09:57 +0000 (17:09 +0200)
committerEnrico Zini <enrico@enricozini.org>
Mon, 28 Sep 2009 15:09:57 +0000 (17:09 +0200)
README
src/display [new file with mode: 0755]

diff --git a/README b/README
index d0c6decce37b264aff3eefcf4f437112f8050508..d4fe7487a3526c14d221430b3f8c76de0cad1999 100644 (file)
--- a/README
+++ b/README
@@ -36,6 +36,10 @@ Getting it to work:
    cp /usr/share/applications/FBReader.desktop ~/.zavai
    cp conf/satmon.desktop ~/.zavai
 
+ * Copy accessory scripts in ~/.zavai
+
+   cp src/display ~/.zavai
+
  * Update the information about the polygen grammars installed in the system
    (optional) 
 
diff --git a/src/display b/src/display
new file mode 100755 (executable)
index 0000000..7fb032c
--- /dev/null
@@ -0,0 +1,36 @@
+#!/bin/sh
+case "$1" in
+       # At the start of zavai
+       init)
+               xset dpms 0 0 30
+               echo 30 > ~/.zavai/blank-timeout
+       ;;
+       # When setting the display to always on
+       lock_on)
+               xset dpms force on
+               xset dpms 0 0 0
+               echo 0 > ~/.zavai/blank-timeout
+       ;;
+       # When locking the screen with the backlight allowed to fade
+       lock_off)
+               xset dpms force off
+               xset dpms 0 0 5
+               echo 5 > ~/.zavai/blank-timeout
+       ;;
+       # Temporarily turn on (for example, to read the time)
+       wiggle)
+               xset dpms force on
+               xset dpms 0 0 `cat ~/.zavai/blank-timeout`
+       ;;
+       defaults)
+               xset dpms force on
+               xset dpms 0 0 30
+               echo 30 > ~/.zavai/blank-timeout
+       ;;
+       *)
+               echo "Invalid option '$1'." >&2
+               exit 1
+       ;;
+esac
+
+exit 0