From c754d6e1a224d4ef295b7374cce6beb794cdc295 Mon Sep 17 00:00:00 2001 From: katherine Date: Sat, 26 Dec 2015 13:01:04 -0700 Subject: fix switcher maybe i'll actually bother using it now --- .config/herbstluftwm/switcher.sh | 12 ++++++------ 1 file 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 -- cgit v1.2.3