set -g base-index 1 setw -g pane-base-index 1 # https://old.reddit.com/r/tmux/comments/mesrci/tmux_2_doesnt_seem_to_use_256_colors/ set -g default-terminal "xterm-256color" set -ga terminal-overrides ",*256col*:Tc" set -ga terminal-overrides '*:Ss=\E[%p1%d q:Se=\E[ q' set-environment -g COLORTERM "truecolor" # Mouse works as expected set-option -g mouse on # easy-to-remember split pane commands bind | split-window -h -c "#{pane_current_path}" bind - split-window -v -c "#{pane_current_path}" # don't rename windows automatically set-option -g allow-rename off # DESIGN TWEAKS # don't do anything when a 'bell' rings set -g visual-activity off set -g visual-bell off set -g visual-silence off setw -g monitor-activity off set -g bell-action none # clock mode setw -g clock-mode-colour yellow # copy mode setw -g mode-style 'fg=black bg=green bold' # panes set -g pane-border-style 'fg=green' set -g pane-active-border-style 'fg=yellow' # statusbar set -g status-position bottom set -g status-justify left set -g status-style 'fg=green' set -g status-left '' set -g status-left-length 10 set -g status-right-style 'fg=black bg=yellow' set -g status-right '%Y-%m-%d %H:%M ' set -g status-right-length 50 setw -g window-status-current-style 'fg=black bg=green' setw -g window-status-current-format ' #I #W #F ' setw -g window-status-style 'fg=green bg=black' setw -g window-status-format ' #I #[fg=white]#W #[fg=yellow]#F ' setw -g window-status-bell-style 'fg=yellow bg=green bold' # messages set -g message-style 'fg=yellow bg=green bold' # Unbind Ctrl+V so it passes through to Kitty for paste unbind C-v # Vim-aware pane navigation with Alt+hjkl is_vim="ps -o state= -o comm= -t '#{pane_tty}' | grep -iqE '^[^TXZ ]+ +(\\S+\\/)?g?(view|n?vim?x?)(diff)?$'" bind-key -n M-h if-shell "$is_vim" "send-keys M-h" "select-pane -L" bind-key -n M-j if-shell "$is_vim" "send-keys M-j" "select-pane -D" bind-key -n M-k if-shell "$is_vim" "send-keys M-k" "select-pane -U" bind-key -n M-l if-shell "$is_vim" "send-keys M-l" "select-pane -R" # Window navigation with Alt+n/p bind-key -n M-n next-window bind-key -n M-p previous-window # Pane resizing with Alt+Shift+hjkl bind-key -n M-S-h resize-pane -L 2 bind-key -n M-S-j resize-pane -D 2 bind-key -n M-S-k resize-pane -U 2 bind-key -n M-S-l resize-pane -R 2 # Copy mode setup bind v copy-mode setw -g mode-keys vi bind-key -T copy-mode-vi 'v' send -X begin-selection bind-key -T copy-mode-vi 'y' send -X copy-pipe-and-cancel 'xclip -in -selection clipboard'