diff options
author | Vasil Zlatanov <vasil.zlatanov@gmail.com> | 2015-08-18 02:38:33 +0200 |
---|---|---|
committer | Vasil Zlatanov <vasil.zlatanov@gmail.com> | 2015-08-18 02:38:33 +0200 |
commit | 6efac1a12c8ab0b7d96a8d342fbd74fce35e8c42 (patch) | |
tree | 93ebfb332b3a231931fe1b1276632bdaa33fa6e4 /Window_Manager/ratpoison/workspace_menu | |
parent | c021038355b6773ab13dae92327fda50c366395f (diff) | |
download | dotfiles-6efac1a12c8ab0b7d96a8d342fbd74fce35e8c42.tar.gz dotfiles-6efac1a12c8ab0b7d96a8d342fbd74fce35e8c42.tar.bz2 dotfiles-6efac1a12c8ab0b7d96a8d342fbd74fce35e8c42.zip |
Organise everything systematically.
Diffstat (limited to 'Window_Manager/ratpoison/workspace_menu')
-rwxr-xr-x | Window_Manager/ratpoison/workspace_menu | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/Window_Manager/ratpoison/workspace_menu b/Window_Manager/ratpoison/workspace_menu new file mode 100755 index 0000000..38ef9fc --- /dev/null +++ b/Window_Manager/ratpoison/workspace_menu @@ -0,0 +1,24 @@ +#!/usr/bin/env bash + +# Lets you switch between all workspaces in a way that minimizes keystrokes. +# The current workspace is selected. + +# Yes, bash is really necessary, because it's version of printf makes this +# script possible. Regular bourne shell printf does NOT. + +workspace_command="/usr/bin/rpws" +ratmenu="~/.config/ratpoison/ratmenu" + +( printf "$ratmenu -style dreary -fg \"$COLOR11\" -bg \"$COLOR0\" -io $[ $($workspace_command current) + 1 ]"; + ratpoison -c "groups" | while read s; do + n=$(echo $s | sed 's/\([0-9]\+\).*/\1/'); +# w=$(echo $s | sed 's/[0-9]\+.\(.*\)/\1/'); + w=$(ratpoison -c "gselect $(($n-1))" -c "windows %t" -c "gprev") + a=$(printf "%3q %q" $n $w); b="$workspace_command $n"; + if [ $n -ne 0 ];then + printf " %q %q" "$a" "$b"; + else + printf " %q %q" "Go to workspace:" "/bin/true"; + fi + done; echo \;) | sh + |