diff options
author | Michael Cardell Widerkrantz <mc@hack.org> | 2012-02-15 10:00:22 +0100 |
---|---|---|
committer | Michael Cardell Widerkrantz <mc@hack.org> | 2012-02-15 10:00:22 +0100 |
commit | a0f63a0aede481c4b36b5434fe3af3b35e5267e7 (patch) | |
tree | 29a48c864ec17428f226a6efd964c948feb2526f /scripts | |
parent | 5dbd2572635d5e6cc54c0920e8502f2f18839de8 (diff) | |
download | mcwm-a0f63a0aede481c4b36b5434fe3af3b35e5267e7.zip |
Moved scripts out of manual.
Diffstat (limited to 'scripts')
-rwxr-xr-x | scripts/9icon | 18 | ||||
-rwxr-xr-x | scripts/mcmenu | 11 |
2 files changed, 29 insertions, 0 deletions
diff --git a/scripts/9icon b/scripts/9icon new file mode 100755 index 0000000..dded416 --- /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/mcmenu b/scripts/mcmenu new file mode 100755 index 0000000..f5d6611 --- /dev/null +++ b/scripts/mcmenu @@ -0,0 +1,11 @@ +#! /bin/sh +exec 9menu -bg grey20 -fg grey80 \\ + -popup \\ + '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:' |