From 75a9a1002e1e1c4c15aa81b4df4a68a491f2d8b1 Mon Sep 17 00:00:00 2001 From: thek4n Date: Tue, 14 May 2024 16:02:45 +0300 Subject: [PATCH] feat(tmux): hook to rename window --- home/user/.config/tmux/mappings.conf | 1 - home/user/.config/tmux/options.conf | 2 ++ 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/home/user/.config/tmux/mappings.conf b/home/user/.config/tmux/mappings.conf index 22d4cf1..5dc6015 100644 --- a/home/user/.config/tmux/mappings.conf +++ b/home/user/.config/tmux/mappings.conf @@ -109,7 +109,6 @@ bind -n M-9 if-shell 'tmux select-window -t 9' '' 'new-window -t 9 -n 9' bind -n M-0 if-shell 'tmux select-window -t 10' '' 'new-window -t 10 -n 10' - # Moving pane to window by Alt+Shift+Number bind -n 'M-!' join-pane -d -t :1 bind -n 'M-@' join-pane -d -t :2 diff --git a/home/user/.config/tmux/options.conf b/home/user/.config/tmux/options.conf index c93549e..37cb870 100644 --- a/home/user/.config/tmux/options.conf +++ b/home/user/.config/tmux/options.conf @@ -22,6 +22,8 @@ set -g lock-command vlock # Shell command to lock client set -g default-terminal "xterm-256color" set -g terminal-overrides[101] "xterm-256color:Tc" +set-hook -g after-new-session[101] 'rename-window -t 1 1' + set -g update-environment[101] 'DISPLAY' set -g update-environment[102] 'WINDOWID' set -g update-environment[103] 'XAUTHORITY'