diff options
author | katherine <shmibs@shmibbles.me> | 2015-12-26 13:01:04 -0700 |
---|---|---|
committer | katherine <shmibs@shmibbles.me> | 2015-12-26 13:01:04 -0700 |
commit | c754d6e1a224d4ef295b7374cce6beb794cdc295 (patch) | |
tree | 5eaaf171a49a4a441a91cd1e1ff4e2d7c71b4028 | |
parent | 75f945cddf787d35dfebbdc3185b88d6338cd161 (diff) | |
download | dotfiles-c754d6e1a224d4ef295b7374cce6beb794cdc295.tar.gz |
fix switcher
maybe i'll actually bother using it now
-rwxr-xr-x | .config/herbstluftwm/switcher.sh | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/.config/herbstluftwm/switcher.sh b/.config/herbstluftwm/switcher.sh index e7ed342..5bd020d 100755 --- a/.config/herbstluftwm/switcher.sh +++ b/.config/herbstluftwm/switcher.sh @@ -2,13 +2,13 @@ source ~/.config/herbstluftwm/config_vars -IFS=$'\r\n' clients=($(wmctrl -l | cut -c -10)) -number=$(wmctrl -l | cut -c 20- | nl -w 2 -s ") " | \ +list=$(wmctrl -l) +IFS=$'\r\n' nums=($(echo $list | cut -d ' ' -f 1)) +choice=$(echo $list | cut -d ' ' -f 5- | nl -w 2 -s ") " | \ dmenu -fn $efont -i -h $bheight -nb $bg_normal -nf $fg_normal \ -sb $bg_focus -sf $fg_focus -p "Select:" -l 40 | \ - grep -oE '[0-9]' | head -1) + cut -d ')' -f 1) -echo ${clients[$number]} -if [ $number ]; then - herbstclient jumpto ${clients[$number]} +if [ $choice ]; then + herbstclient jumpto ${nums[$choice]} fi |