summaryrefslogtreecommitdiff
path: root/scripts
diff options
context:
space:
mode:
authorSean Whitton <spwhitton@spwhitton.name>2021-03-09 10:15:06 -0700
committerSean Whitton <spwhitton@spwhitton.name>2021-03-09 10:15:06 -0700
commitc8b9990e15948ddf30282d4a8f6c52cf31542d7c (patch)
treead1d222a66db4771a7aba64134eb8d0cfc7d47a8 /scripts
parentc83866b70fa1f38f37b488547367bf62018c58a7 (diff)
downloaddotfiles-c8b9990e15948ddf30282d4a8f6c52cf31542d7c.tar.gz
add C-i / binding
Diffstat (limited to 'scripts')
-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
+ }