summaryrefslogtreecommitdiff
path: root/scripts
diff options
context:
space:
mode:
Diffstat (limited to 'scripts')
-rwxr-xr-xscripts/9icon18
-rwxr-xr-xscripts/mcicon6
-rwxr-xr-xscripts/mcmenu11
3 files changed, 35 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
diff --git a/scripts/mcicon b/scripts/mcicon
new file mode 100755
index 0000000..f002a55
--- /dev/null
+++ b/scripts/mcicon
@@ -0,0 +1,6 @@
+#! /bin/sh
+
+# mcicon - list iconified windows in menu and map the chosen one.
+# Needs hidden (distributed with mcwm), 9menu and xdotool.
+
+hidden -c | xargs 9menu -popup -label 9icon -bg grey20 -fg grey80 -font 9x15
diff --git a/scripts/mcmenu b/scripts/mcmenu
new file mode 100755
index 0000000..6d32940
--- /dev/null
+++ b/scripts/mcmenu
@@ -0,0 +1,11 @@
+#! /bin/sh
+exec 9menu -bg grey20 -fg grey80 -popup \
+ 'hide:xdotool selectwindow windowminimize' \
+ 'cpu:urxvt -e ssh cpu.example.org' \
+ ':' \
+ 'VGA On: xrandr --output VGA --on' \
+ 'VGA Off: xrandr --output VGA --off' \
+ ':' \
+ 'HHKB: xkbcomp -I$HOME/conf/xkb $HOME/conf/xkb/hhkb.xkb $DISPLAY' \
+ ':' \
+ 'close:'