+#!/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