aboutsummaryrefslogtreecommitdiff
path: root/packaging/tmux
diff options
context:
space:
mode:
Diffstat (limited to 'packaging/tmux')
-rw-r--r--packaging/tmux/dingger.tmux6
1 files changed, 6 insertions, 0 deletions
diff --git a/packaging/tmux/dingger.tmux b/packaging/tmux/dingger.tmux
index f1529f1..b0b0951 100644
--- a/packaging/tmux/dingger.tmux
+++ b/packaging/tmux/dingger.tmux
@@ -18,3 +18,9 @@ bind -n MouseDown1StatusRight if -F '#{==:#{mouse_status_range},restore}' \
set-hook -g 'client-session-changed[77]' 'run-shell -b "$HOME/.local/bin/dingger poke"'
set-hook -g 'session-window-changed[77]' 'run-shell -b "$HOME/.local/bin/dingger poke"'
set-hook -g 'window-pane-changed[77]' 'run-shell -b "$HOME/.local/bin/dingger poke"'
+# When a terminal window gains focus, dingger learns which window holds this
+# client, so a jump raises exactly that window, tab, and split. Needs the
+# terminal's focus reports. (#{hook_client}: in a hook, #{client_name} may be
+# another client.)
+set -g focus-events on
+set-hook -g 'client-focus-in[77]' "run-shell -b \"$HOME/.local/bin/dingger terminal focused --client '#{hook_client}'\""