summaryrefslogtreecommitdiffstats
path: root/local/.bin/hornet/sc
diff options
context:
space:
mode:
authorJesse Luehrs <doy@tozt.net>2023-10-08 12:09:20 -0400
committerJesse Luehrs <doy@tozt.net>2023-10-08 12:59:10 -0400
commit49570c8dd03448240897b37b68567352b790f16f (patch)
tree6c192a52046d5d0dd1b84a838befd8e777cfeafb /local/.bin/hornet/sc
parent66939c71da756c1d9e07a88a4a8ea2a018650060 (diff)
downloadconf-49570c8dd03448240897b37b68567352b790f16f.tar.gz
conf-49570c8dd03448240897b37b68567352b790f16f.zip
convert to stow
Diffstat (limited to 'local/.bin/hornet/sc')
-rwxr-xr-xlocal/.bin/hornet/sc19
1 files changed, 19 insertions, 0 deletions
diff --git a/local/.bin/hornet/sc b/local/.bin/hornet/sc
new file mode 100755
index 0000000..614a1bc
--- /dev/null
+++ b/local/.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