From 24da885f89fc200469ab803915d8f1f78c9add5f Mon Sep 17 00:00:00 2001 From: John Mertz Date: Wed, 20 Jul 2022 23:34:39 -0400 Subject: [PATCH] Update wofi-alt-tab.sh formatting --- wofi/wofi-alt-tab.sh | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) diff --git a/wofi/wofi-alt-tab.sh b/wofi/wofi-alt-tab.sh index 1bfa6cc..d087523 100755 --- a/wofi/wofi-alt-tab.sh +++ b/wofi/wofi-alt-tab.sh @@ -4,10 +4,8 @@ swaymsg -t get_tree | jq -r '.nodes[].nodes[] | if .nodes then [recurse(.nodes[])] else [] end + .floating_nodes | .[] | select(.nodes==[]) | if .app_id then ((.app_id | tostring) + " -- " + .name) else .name end' | grep -v '__i3_scratch' | sed -e 's/\([^\-]\)\- *[^\-]*$/\1/' | - -sed -e 's/^\([0-9]*\)\t*\(.*\)/\2 \1/' | - -wofi -I --show dmenu | { - read -r id name - swaymsg "[con_id=$id]" focus -} + sed -e 's/^\([0-9]*\)\t*\(.*\)/\2 \1/' | + wofi -I --show dmenu | { + read -r id name + swaymsg "[con_id=$id]" focus + }