diff options
| author | Jack Jamison <jackqjamison@gmail.com> | 2026-01-23 11:00:52 -0500 |
|---|---|---|
| committer | Jack Jamison <jackqjamison@gmail.com> | 2026-01-23 11:00:52 -0500 |
| commit | 6e8fbf36e07f9dd671880c4231131e0e38c2d384 (patch) | |
| tree | efb9f3cf29b7b31f915c7b29dd4785a8d893980e /scripts/focus-sway | |
| parent | 1df6a929cb0f540b2b8caf8f127afc3ad6c2468c (diff) | |
bash and more proj stuff
Diffstat (limited to 'scripts/focus-sway')
| -rwxr-xr-x | scripts/focus-sway | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/scripts/focus-sway b/scripts/focus-sway new file mode 100755 index 0000000..e3c63fb --- /dev/null +++ b/scripts/focus-sway @@ -0,0 +1,10 @@ +#!/bin/bash + +# Get available windows +windows=$(swaymsg -t get_tree | jq -r '.nodes[1].nodes[].nodes[] | .. | (.id|tostring) + " " + .name?' | grep -e "[0-9]* ." ) + +# Select window with rofi +selected=$(echo "$windows" | swenu -coil 10 | awk '{print $1}') + +# Tell sway to focus said window +swaymsg [con_id="$selected"] focus |
