# # General # set -g mouse on set -g base-index 1 set -g pane-base-index 1 set -g renumber-windows on # # Keybinds # set -sg escape-time 0 set -g repeat-time 500 bind r source-file ~/.tmux.conf # Undo keybinds unbind '$' unbind '"' unbind d unbind ( unbind ) unbind & unbind % unbind o unbind [ unbind ] unbind z unbind C-b # Change prefix key set -g prefix C-f bind C-f set status # Pane/window manipulation bind -r h select-pane -L bind -r j select-pane -D bind -r k select-pane -U bind -r l select-pane -R bind -r H resize-pane -L 2 bind -r J resize-pane -D 2 bind -r K resize-pane -U 2 bind -r L resize-pane -R 2 bind n new-window bind N new-session bind X kill-window bind m resize-pane -Z bind -r C-j next-window bind -r C-k previous-window bind s split-window -v -c '#{pane_current_path}' bind S split-window -v -f -c '#{pane_current_path}' bind v split-window -h -c '#{pane_current_path}' bind V split-window -h -f -c '#{pane_current_path}' # Vim settings set -g mode-keys vi bind c copy-mode bind p paste-buffer bind \; command-prompt bind -T copy-mode-vi Escape send -X cancel bind -T copy-mode-vi 'v' send -X begin-selection bind -T copy-mode-vi 'y' send -X copy-selection-and-cancel # # Appearance # set -g allow-rename off set -g status-position top set -g status-left ' ' set -g status-right '#{prefix_highlight} ' set -g window-status-format ' #I ' set -g window-status-current-format '[#I]' set -g status-style bold set -g status-fg default set -g status-bg default set -g message-style reverse # # Remote sessions support # https://medium.freecodecamp.org/tmux-in-practice-local-and-nested-remote-tmux-sessions-4f7ba5db8795 # bind -T root F12 \ set prefix None \;\ set key-table off \;\ set status-attr default \;\ set status-fg colour242 \;\ if -F '#{pane_in_mode}' 'send-keys -X cancel' \;\ refresh-client -S bind -T off F12 \ set -u prefix \;\ set -u key-table \;\ set status-attr bold \;\ set status-fg default \;\ refresh-client -S # # TPM plugins # set -g @plugin 'tmux-plugins/tpm' set -g @plugin 'tmux-plugins/tmux-sensible' set -g @plugin 'tmux-plugins/tmux-prefix-highlight' set -g @prefix_highlight_copy_prompt 'COPY' set -g @prefix_highlight_prefix_prompt 'TMUX' set -g @prefix_highlight_show_copy_mode 'on' if-shell '[[ "$OS" != macos ]]' \ 'set -g @plugin "tmux-plugins/tmux-yank"' if-shell '[ -z "$SSH_CONNECTION" ] || [ -n "$SSH_ROOT" ]' \ '\ set -g status-position bottom ;\ set -g status-right "#{prefix_highlight} #U@#H " ;\ set -g @plugin "soyuka/tmux-current-pane-hostname" ;\ ' # # Custom configuration # if-shell '[ -f ~/.tmux.conf.local ]' \ 'source-file ~/.tmux.conf.local' # # TPM bootstrap # run '$TMUX_PLUGIN_MANAGER_PATH/tpm/tpm'