This commit is contained in:
jay committed 2024-12-25 21:36:50 +08:00
1 parent 232952f9ec
commit c93c4e25d7
9 files changed
+37 -3

No files matched your search

@@ -0,0 +1,15 @@
#!/bin/bash
entries=$(swaymsg -t get_tree | jq -r -c '
recurse(.nodes[]?) |
recurse(.floating_nodes[]?) |
select(.type=="con"), select(.type=="floating_con") |
(.id | tostring) + " " + .app_id + ": " + .name')
echo "$entries"
selected=$(echo -e "$entries" | wofi --width 450 --height 350 --dmenu --cache-file /dev/null | awk '{print $1}')
if [ -n "$selected" ]; then
swaymsg "[con_id=$selected]" focus
fi