aboutsummaryrefslogtreecommitdiffstats
path: root/hlwm-switch-to-window
diff options
context:
space:
mode:
Diffstat (limited to 'hlwm-switch-to-window')
-rwxr-xr-xhlwm-switch-to-window8
1 files changed, 8 insertions, 0 deletions
diff --git a/hlwm-switch-to-window b/hlwm-switch-to-window
new file mode 100755
index 0000000..4a722db
--- /dev/null
+++ b/hlwm-switch-to-window
@@ -0,0 +1,8 @@
+#!/usr/bin/env bash
+
+winid="0x$(printf "%x\n" $1)"
+tag=$(herbstclient attr clients.$winid.tag)
+herbstclient chain \
+ , silent substitute M tags.by-name.$tag.my_monitor focus_monitor M \
+ , use $tag \
+ , jumpto $winid