summaryrefslogtreecommitdiff
path: root/scripts/9icon
diff options
context:
space:
mode:
authorcos <cos>2013-10-21 23:27:57 +0200
committercos <cos>2013-10-21 23:27:57 +0200
commitc21f516a417f818f20a87dc2a5ed9d5d8bac8225 (patch)
tree000cadd9762c32ed63d4e42e8e6a6b5de9f343a1 /scripts/9icon
parentf0a955ee965156ec5d5f9cfde3446579d519b690 (diff)
parentf20b857e33d1ffcb36ae3a4bcf38f500e24c2536 (diff)
downloadmcwm-c21f516a417f818f20a87dc2a5ed9d5d8bac8225.zip
Merge tag '20130209-2' into debianization
20130209-2
Diffstat (limited to 'scripts/9icon')
-rwxr-xr-xscripts/9icon18
1 files changed, 18 insertions, 0 deletions
diff --git a/scripts/9icon b/scripts/9icon
new file mode 100755
index 0000000..73edc6e
--- /dev/null
+++ b/scripts/9icon
@@ -0,0 +1,18 @@
+#! /bin/sh
+
+# 9icon - show 9menu of hidden windows for mapping
+# Originally by Christian Neukirchen <chneukirchen@gmail.com> and
+# slightly changed by MC.
+
+IFS="
+"
+
+for win in $(xwininfo -root -children | awk '$1~/0x/ && $2~/"/ {print $1}'); do
+ xprop -id $win WM_NAME WM_STATE |
+ awk -F'"' -v win=$win '
+ /^WM_NAME/ { name=$2 }
+ /window state: Iconic/ {
+ print "'\''" name "'\''" "'\''" ":xdotool windowmap " win " windowraise " win "'\''"
+ }
+ '
+done | xargs 9menu -popup -label 9icon -bg grey20 -fg grey80 -font fixed