summaryrefslogtreecommitdiffstats
path: root/bin/hornet/sc
diff options
context:
space:
mode:
Diffstat (limited to 'bin/hornet/sc')
-rwxr-xr-xbin/hornet/sc19
1 files changed, 19 insertions, 0 deletions
diff --git a/bin/hornet/sc b/bin/hornet/sc
new file mode 100755
index 0000000..d86b917
--- /dev/null
+++ b/bin/hornet/sc
@@ -0,0 +1,19 @@
+#!/bin/sh
+
+case "$1" in
+ on)
+ xset s 300 5
+ xset dpms 600 600 600
+ ;;
+ off)
+ xset s off
+ xset dpms 0 0 0
+ ;;
+ q)
+ xset q | perl -nlE'print if ((/^(:?Screen Saver|DPMS)/.../^[^\s]/) && /^(:?Screen Saver|DPMS|\s)/)'
+ ;;
+ *)
+ echo "$(basename "$0"): unknown argument '$1'" >&2
+ exit 1
+ ;;
+esac