diff --git a/home/user/.config/tmux/mappings.conf b/home/user/.config/tmux/mappings.conf index e07ab0a..22d4cf1 100644 --- a/home/user/.config/tmux/mappings.conf +++ b/home/user/.config/tmux/mappings.conf @@ -96,16 +96,19 @@ bind -n M-p previous-window bind -n M-n next-window bind -n M-Tab last-window -bind -n M-1 new-window -n 1 -S -c "#{pane_current_path}" -bind -n M-2 new-window -n 2 -S -c "#{pane_current_path}" -bind -n M-3 new-window -n 3 -S -c "#{pane_current_path}" -bind -n M-4 new-window -n 4 -S -c "#{pane_current_path}" -bind -n M-5 new-window -n 5 -S -c "#{pane_current_path}" -bind -n M-6 new-window -n 6 -S -c "#{pane_current_path}" -bind -n M-7 new-window -n 7 -S -c "#{pane_current_path}" -bind -n M-8 new-window -n 8 -S -c "#{pane_current_path}" -bind -n M-9 new-window -n 9 -S -c "#{pane_current_path}" -bind -n M-0 new-window -n 10 -S -c "#{pane_current_path}" + +bind -n M-1 if-shell 'tmux select-window -t 1' '' 'new-window -t 1 -n 1' +bind -n M-2 if-shell 'tmux select-window -t 2' '' 'new-window -t 2 -n 2' +bind -n M-3 if-shell 'tmux select-window -t 3' '' 'new-window -t 3 -n 3' +bind -n M-4 if-shell 'tmux select-window -t 4' '' 'new-window -t 4 -n 4' +bind -n M-5 if-shell 'tmux select-window -t 5' '' 'new-window -t 5 -n 5' +bind -n M-6 if-shell 'tmux select-window -t 6' '' 'new-window -t 6 -n 6' +bind -n M-7 if-shell 'tmux select-window -t 7' '' 'new-window -t 7 -n 7' +bind -n M-8 if-shell 'tmux select-window -t 8' '' 'new-window -t 8 -n 8' +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 diff --git a/home/user/.config/tmux/options.conf b/home/user/.config/tmux/options.conf index 78d6439..c93549e 100644 --- a/home/user/.config/tmux/options.conf +++ b/home/user/.config/tmux/options.conf @@ -22,9 +22,6 @@ 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-window[101] 'rename-window -t 1 1' -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'