aboutsummaryrefslogtreecommitdiff
path: root/wmutils/bin/wm
diff options
context:
space:
mode:
Diffstat (limited to 'wmutils/bin/wm')
-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