From 49925afc61f0418bb14bdc4005951987b9d3fdfe Mon Sep 17 00:00:00 2001 From: John Mertz Date: Fri, 23 Sep 2022 18:25:32 -0400 Subject: [PATCH] clean up window titles --- wofi/wofi-alt-tab.sh | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/wofi/wofi-alt-tab.sh b/wofi/wofi-alt-tab.sh index c7c59bb..3aae524 100755 --- a/wofi/wofi-alt-tab.sh +++ b/wofi/wofi-alt-tab.sh @@ -1,9 +1,9 @@ #!/bin/bash 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/' | + grep -v __i3_scratch | + 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 | {