From 0c17da8c14298d66706138f4951521ab776e2bb2 Mon Sep 17 00:00:00 2001 From: John Mertz Date: Fri, 4 Nov 2022 11:02:59 -0400 Subject: [PATCH] wofi-alt-tab.sh --- wofi/wofi-alt-tab.sh | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/wofi/wofi-alt-tab.sh b/wofi/wofi-alt-tab.sh index 3aae524..fa7ea04 100755 --- a/wofi/wofi-alt-tab.sh +++ b/wofi/wofi-alt-tab.sh @@ -5,8 +5,10 @@ swaymsg -t get_tree | sed -e 's/^.*\-\- \(.*\)$/\1/' | sed -e 's/^\(.*\) [—-] .*$/\1/'| sed -e 's/^\([0-9]*\)\t*\(.*\)/\2 \1/' | - wofi -I -s /home/jpm/.dotfiles/wofi/style.css -c \ - $HOME/.dotfiles/wofi/sidebar --show dmenu | { - read -r id name - swaymsg "[con_id=$id]" focus - } + wofi -s $HOME/.dotfiles/wofi/style.css -c \ + $HOME/.dotfiles/wofi/sidebar -d | { + read -r + id=`echo $REPLY | rev | cut -d' ' -f1 | rev` + swaymsg "[con_id=$id]" focus + } + echo $id $REPLY