From d923956d4866beb5093c89e0c1a4f54a9c37070f Mon Sep 17 00:00:00 2001 From: Vasil Zlatanov Date: Tue, 18 Aug 2015 01:39:43 +0200 Subject: major fixes and rearrangement --- tools/window_menu | 40 ---------------------------------------- 1 file changed, 40 deletions(-) delete mode 100755 tools/window_menu (limited to 'tools/window_menu') diff --git a/tools/window_menu b/tools/window_menu deleted file mode 100755 index 950d252..0000000 --- a/tools/window_menu +++ /dev/null @@ -1,40 +0,0 @@ -#!/usr/bin/env bash - -# Lets you switch between all windows in a way that minimizes keystrokes. - -# Two ways to order: -# - 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="~/.tools/ratmenu" - -source ~/.colors - -# Yes, bash is really necessary, because it's version of printf makes this -# script possible. Regular bourne shell printf does NOT. - -window_index_str=$(ratpoison -c "info" | sed 's/^.*\([0-9]\)(.*$/\1/') -if [ "$window_index_str" = "No window." ]; then - group_index=$($HOME/.tools/workspace current) - $ratmenu -style dreary -fg \"$COLOR0\" -bg \"$COLOR0\" "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 \"$COLOR11\" -bg \"$COLOR0\" -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 \"$COLOR11\" -bg \"$COLOR0\" -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"; - done; echo \;) | sh - fi -fi -- cgit v1.2.3-54-g00ecf