From fc8df60b573c14caa69a0d4da7a0f85cd4d3ef77 Mon Sep 17 00:00:00 2001 From: John Mertz Date: Wed, 20 Jul 2022 23:34:02 -0400 Subject: [PATCH] Testing wofi with alt-tab Functional, but needs to be styled --- wofi/wofi-alt-tab.sh | 13 +++++++++++++ 1 file changed, 13 insertions(+) create mode 100755 wofi/wofi-alt-tab.sh diff --git a/wofi/wofi-alt-tab.sh b/wofi/wofi-alt-tab.sh new file mode 100755 index 0000000..1bfa6cc --- /dev/null +++ b/wofi/wofi-alt-tab.sh @@ -0,0 +1,13 @@ +#!/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/' | + +sed -e 's/^\([0-9]*\)\t*\(.*\)/\2 \1/' | + +wofi -I --show dmenu | { + read -r id name + swaymsg "[con_id=$id]" focus +}