summaryrefslogtreecommitdiff
path: root/scripts/desktop/wofi_window
diff options
context:
space:
mode:
Diffstat (limited to 'scripts/desktop/wofi_window')
-rwxr-xr-xscripts/desktop/wofi_window11
1 files changed, 11 insertions, 0 deletions
diff --git a/scripts/desktop/wofi_window b/scripts/desktop/wofi_window
new file mode 100755
index 00000000..2949be8c
--- /dev/null
+++ b/scripts/desktop/wofi_window
@@ -0,0 +1,11 @@
+#!/bin/sh
+
+# straight from wofi(7)
+
+swaymsg -t get_tree \
+ | jq -r '.nodes[].nodes[] | if .nodes then [recurse(.nodes[])] else [] end + .floating_nodes | .[] | select(.nodes==[]) | ((.id | tostring) + " " + .name)' \
+ | wofi -i --show dmenu \
+ | {
+ read -r id name
+ swaymsg "[con_id=$id]" focus
+ }