aboutsummaryrefslogtreecommitdiff
path: root/wmutils/bin/wm
diff options
context:
space:
mode:
authorxero <x@xero.nu>2017-01-22 23:22:55 -0500
committerxero <x@xero.nu>2017-01-22 23:22:55 -0500
commit5a4d4a06a287985fbf5b458056881d3d0a0c71aa (patch)
tree0daa8de87d60c396ca3dbadccbdfe735fc5f72d8 /wmutils/bin/wm
parent4d6c6b497c3e4d5d6bd4e7728f42303f23120f27 (diff)
downloaddotfiles_ascii-5a4d4a06a287985fbf5b458056881d3d0a0c71aa.tar.xz
dotfiles_ascii-5a4d4a06a287985fbf5b458056881d3d0a0c71aa.zip
add wmutils setup
Diffstat (limited to '')
-rwxr-xr-xwmutils/bin/wm45
1 files changed, 45 insertions, 0 deletions
diff --git a/wmutils/bin/wm b/wmutils/bin/wm
new file mode 100755
index 0000000..2124a6b
--- /dev/null
+++ b/wmutils/bin/wm
@@ -0,0 +1,45 @@
+#!/bin/sh
+# ██ ██ ██
+# ░██ ░░ ░██
+# ███ ██ ██████████ ██ ██ ██████ ██ ░██ ██████
+#░░██ █ ░██░░██░░██░░██░██ ░██░░░██░ ░██ ░██ ██░░░░
+# ░██ ███░██ ░██ ░██ ░██░██ ░██ ░██ ░██ ░██░░█████
+# ░████░████ ░██ ░██ ░██░██ ░██ ░██ ░██ ░██ ░░░░░██
+# ███░ ░░░██ ███ ░██ ░██░░██████ ░░██ ░██ ███ ██████
+#░░░ ░░░ ░░░ ░░ ░░ ░░░░░░ ░░ ░░ ░░░ ░░░░░░
+
+
+wmutilsdir="/tmp/wmutils"
+mkdir -p "$wmutilsdir/window"
+cat "/dev/null" > "$wmutilsdir/window/active"
+
+~/bin/tray &
+~/bin/clock &
+~/bin/wgrp -m &
+~/bin/bar 'wgrp -b' &
+~/bin/pulse &
+
+wew | while IFS=: read ev wid; do
+ wattr o $wid && continue
+ case $ev in
+ # enter/leave
+ 7)
+ echo "$(wname "$wid")" > "$wmutilsdir/window/active"
+ ;;
+ # create
+ 16)
+ echo "$(wname "$wid")" > "$wmutilsdir/window/active"
+ ;;
+ # close
+ 18)
+ ~/bin/focus.sh prev 2>/dev/null
+ ~/bin/wgrp -R $wid 2>/dev/null
+ echo "$(wname `pfw`)" > "$wmutilsdir/window/active"
+ ;;
+ # window map
+ 19)
+ echo "$(wname "$wid")" > "$wmutilsdir/window/active"
+ ~/bin/focus.sh $wid
+ ;;
+ esac
+done