summaryrefslogtreecommitdiff
path: root/.config/wmii-hg/rbar.sh
diff options
context:
space:
mode:
Diffstat (limited to '.config/wmii-hg/rbar.sh')
-rw-r--r--.config/wmii-hg/rbar.sh18
1 files changed, 18 insertions, 0 deletions
diff --git a/.config/wmii-hg/rbar.sh b/.config/wmii-hg/rbar.sh
new file mode 100644
index 0000000..8297b71
--- /dev/null
+++ b/.config/wmii-hg/rbar.sh
@@ -0,0 +1,18 @@
+#!/bin/bash
+setup_trap() {
+ trap "rm -f -- ${HOME}/n/wmii*/rbar/${1}" EXIT
+}
+
+write() {
+ dirs=("${HOME}"/n/wmii*/rbar/)
+ sponge|tee -a "${dirs[@]/%/${1}}" > /dev/null
+}
+
+set -eE
+shopt -s nullglob
+case "$1" in
+ 1) left-click;;
+ 2) middle-click;;
+ 3) right-click;;
+ *) update "$1";;
+esac