set -g mouse on # set-option -sa terminal-overrides ",xterm*:Tc" set -g default-terminal "tmux-256color" # set -ga terminal-overrides ",alacritty:Tc" set-option -ga terminal-overrides ",xterm*:Tc" # set-option -sa terminal-overrides ",alacritty:Tc" # unbind C-b # set -g prefix C-s # bind C-s send-prefix unbind % bind | split-window -h -c "#{pane_current_path}" unbind '"' bind - split-window -v -c "#{pane_current_path}" unbind r bind r source-file ~/.config/tmux/tmux.conf bind -r j resize-pane -D 5 bind -r k resize-pane -U 5 bind -r l resize-pane -R 5 bind -r h resize-pane -L 5 bind -r m resize-pane -Z # bind-key -n C-M-space set status # toggle status bar set -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-selection # unbind -T copy-mode-vi MouseDragEnd1Pane bind-key C-a last-window # Start numbering at 1 # Start windows and panes at 1, not 0 set -g base-index 1 set -g pane-base-index 1 set-window-option -g pane-base-index 1 set-option -g renumber-windows on # Use Alt-arrow keys without prefix key to switch panes bind -n M-Left select-pane -L bind -n M-Right select-pane -R bind -n M-Up select-pane -U bind -n M-Down select-pane -D # Shift arrow to switch windows bind -n S-Left previous-window bind -n S-Right next-window set -g status-right "| %H:%M %d-%b-%y" set -g status-style "fg=#665c54" set -g status-left-style "fg=#928374" set -g status-left-length 20 # length name session # set -g status-bg "#181818" set -g status-position top set -g status-interval 1 # set -g status-left "" set -g status-left "#{?client_prefix,#[reverse],}[#{session_name}]#[default] " # List of plugins set -g @plugin 'tmux-plugins/tpm' set -g @plugin 'tmux-plugins/tmux-sensible' # set -g @plugin 'christoomey/vim-tmux-navigator' # Initialize TMUX plugin manager (keep this line at the very bottom of tmux.conf) run '~/.tmux/plugins/tpm/tpm' # Smart pane switching with awareness of Vim splits. # See: https://github.com/christoomey/vim-tmux-navigator # decide whether we're in a Vim process # is_vim="ps -o state= -o comm= -t '#{pane_tty}' \ # | grep -iqE '^[^TXZ ]+ +(\\S+\\/)?g?(view|n?vim?x?)(diff)?$'" # # bind-key -n 'C-h' if-shell "$is_vim" 'send-keys C-h' 'select-pane -L' # bind-key -n 'C-j' if-shell "$is_vim" 'send-keys C-j' 'select-pane -D' # bind-key -n 'C-k' if-shell "$is_vim" 'send-keys C-k' 'select-pane -U' # bind-key -n 'C-l' if-shell "$is_vim" 'send-keys C-l' 'select-pane -R' # # tmux_version='$(tmux -V | sed -En "s/^tmux ([0-9]+(.[0-9]+)?).*/\1/p")' # # if-shell -b '[ "$(echo "$tmux_version < 3.0" | bc)" = 1 ]' \ # "bind-key -n 'C-\\' if-shell \"$is_vim\" 'send-keys C-\\' 'select-pane -l'" # if-shell -b '[ "$(echo "$tmux_version >= 3.0" | bc)" = 1 ]' \ # "bind-key -n 'C-\\' if-shell \"$is_vim\" 'send-keys C-\\\\' 'select-pane -l'" # # bind-key -n 'C-Space' if-shell "$is_vim" 'send-keys C-Space' 'select-pane -t:.+' # # bind-key -T copy-mode-vi 'C-h' select-pane -L # bind-key -T copy-mode-vi 'C-j' select-pane -D # bind-key -T copy-mode-vi 'C-k' select-pane -U # bind-key -T copy-mode-vi 'C-l' select-pane -R # bind-key -T copy-mode-vi 'C-/' select-pane -l # bind-key -T copy-mode-vi 'C-Space' select-pane -t:.+