aboutsummaryrefslogtreecommitdiff
path: root/ratpoison/window_menu
diff options
context:
space:
mode:
authorVasil Zlatanov <vasil.zlatanov@gmail.com>2014-11-23 11:08:21 +0100
committerVasil Zlatanov <vasil.zlatanov@gmail.com>2014-11-23 11:08:21 +0100
commit6d6e0462eb2dd1d770653f5e22582e3571c63c8f (patch)
tree897c90f8ef0290fe974a9381eeec964545607904 /ratpoison/window_menu
parent8dee1d67a9e2caa3a3286b13c86880c0757fcd16 (diff)
downloaddotfiles-6d6e0462eb2dd1d770653f5e22582e3571c63c8f.tar.gz
dotfiles-6d6e0462eb2dd1d770653f5e22582e3571c63c8f.tar.bz2
dotfiles-6d6e0462eb2dd1d770653f5e22582e3571c63c8f.zip
big ratpoison update
Diffstat (limited to 'ratpoison/window_menu')
-rwxr-xr-xratpoison/window_menu11
1 files changed, 6 insertions, 5 deletions
diff --git a/ratpoison/window_menu b/ratpoison/window_menu
index 60f9af7..46b4bd3 100755
--- a/ratpoison/window_menu
+++ b/ratpoison/window_menu
@@ -6,6 +6,7 @@
# - If order=last, the windows are listed in the order that you last visited them in.
# - If order=sequential, the windows are listed in number order.
order=sequential
+ratmenu="~/.ratpoison/ratmenu"
# Yes, bash is really necessary, because it's version of printf makes this
# script possible. Regular bourne shell printf does NOT.
@@ -13,22 +14,22 @@ order=sequential
window_index_str=$(ratpoison -c "info" | sed 's/^.*\([0-9]\)(.*$/\1/')
if [ "$window_index_str" = "No window." ]; then
group_index=$($HOME/.ratpoison/workspace current)
- ratmenu -style dreary -fg "#657b83" -bg "#eee8d5" "No windows in group $group_index"
+ $ratmenu -style dreary -fg "#657b83" -bg "#eee8d5" "No windows in group $group_index"
/bin/true
else
ratpoison -c "echo $window_index_str"
echo "$window_index_str">/tmp/log
window_index=$[ $window_index_str + 1 ]
if [ $order = sequential ]; then
- ( printf "ratmenu -style dreary -fg '#657b83' -bg '#eee8d5' -io $window_index \
- \"Select a Window\" /bin/true";
+ ( printf "$ratmenu -style dreary -fg '#657b83' -bg '#eee8d5' -io $window_index \
+ ";
ratpoison -c "windows %n %n %t" | sort -n | while read w x z; do
a=$(printf "%3q" $x); b="ratpoison -c \"select $x\"";
printf " %q\\ %q %q" "$a" "$z" "$b";
done; echo \;) | sh
elif [ $order = last ]; then
- ( printf "ratmenu -style dreary -fg '#657b83' -bg '#eee8d5' -io $window_index \
- \"Select a Window\" /bin/true";
+ ( printf "$ratmenu -style dreary -fg '#657b83' -bg '#eee8d5' -io $window_index \
+ ";
ratpoison -c "windows %l %n %t" | sort -rn | while read w x z; do
a=$(printf "%3q" $x); b="ratpoison -c \"select $x\"";
printf " %q\\ %q %q" "$a" "$z" "$b";