summaryrefslogtreecommitdiff
path: root/scripts/barhandler
diff options
context:
space:
mode:
Diffstat (limited to 'scripts/barhandler')
-rwxr-xr-xscripts/barhandler15
1 files changed, 15 insertions, 0 deletions
diff --git a/scripts/barhandler b/scripts/barhandler
new file mode 100755
index 0000000..fa696e7
--- /dev/null
+++ b/scripts/barhandler
@@ -0,0 +1,15 @@
+while true; do
+ read input
+ case $input in
+ selectopt)
+ setsid --fork selectopt
+ ;;
+ swatch)
+ SWATCH=$(cat /tmp/swatch)
+ ([ $SWATCH = "0" ] && echo "1" || echo "0") > /tmp/swatch
+ ;;
+ *)
+ echo $input
+ ;;
+ esac
+done