set -ga update-environment EDITOR # List of plugins set -g @plugin 'tmux-plugins/tpm' set -g @plugin 'tmux-plugins/tmux-sensible' set -g @plugin 'tmux-plugins/tmux-pain-control' set -g @plugin 'tmux-plugins/tmux-copycat' set -g @plugin 'tmux-plugins/tmux-open' set -g @plugin 'tmux-plugins/tmux-sessionist' set -g @plugin 'tmux-plugins/tmux-yank' set -g @plugin 'nhdaly/tmux-better-mouse-mode' set -g @plugin 'rickstaa/tmux-notify' set -g @plugin 'egel/tmux-gruvbox' set -g @plugin 'artemave/tmux_super_fingers' set -g @plugin 'aserowy/tmux.nvim' set -g @plugin 'tmux-plugins/tmux-resurrect' set -g @plugin 'tmux-plugins/tmux-continuum' unbind C-b set -g prefix ` set -g prefix2 C-Space # Start window numbering at 1 set -g base-index 1 setw -g mode-keys vi set-option -g mouse on bind-key R run-shell 'tmux source-file ~/.config/tmux/tmux.conf > /dev/null; \ tmux display-message "Sourced tmux.conf!"' ## Join windows: s, j bind-key j command-prompt -p "join pane from:" "join-pane -s '%%'" bind-key s command-prompt -p "send pane to:" "join-pane -t '%%'" unbind-key -T copy-mode-vi v unbind-key -T copy-mode-vi 'C-v' bind-key -T copy-mode-vi v send -X begin-selection bind-key -T copy-mode-vi 'C-v' send -X begin-selection \; send -X rectangle-toggle; bind-key -T copy-mode-vi 'y' send -X copy-selection bind-key -T copy-mode-vi 'C-e' send -X end-of-line bind-key -T copy-mode-vi 'C-a' send -X start-of-line set-option -g default-shell $SHELL set -g default-terminal "tmux-256color" set -as terminal-features ",alacritty*:RGB" set -ga terminal-features "*:hyperlinks" ## update the TERM variable of terminal emulator when creating a new session or attaching a existing session set -g update-environment 'DISPLAY SSH_ASKPASS SSH_AGENT_PID SSH_CONNECTION WINDOWID XAUTHORITY TERM COLORTERM' # If you SSH into a host in a tmux window, you'll notice the window title of your terminal emulator remains to be user@localhost rather than user@server. To allow the title bar to adapt to whatever host you connect to, set the following in ~/.tmux.conf set -g set-titles on set -g set-titles-string "#T" set -g automatic-rename-format "#{?pane_in_mode,[tmux],#{?#{==:#{pane_current_command},zsh}, #{b:pane_current_path}, #{b:pane_current_path}:#{pane_current_command}}}#{?pane_dead,[dead],}" set-option -g renumber-windows on set -g @tmux-gruvbox 'dark' set -g @tmux-gruvbox-statusbar-alpha 'true' set -g @tmux-gruvbox-right-status-z '#h C:#{continuum_status}' set -g @yank_selection_mouse 'clipboard' set -g @yank_action 'copy-pipe' set -g @tmux-nvim-condition "ps -t '#{pane_tty}' -o state= -o args= | grep -iqE '^[^TXZ ]+ .*g?(view|n?vim?x?|fzf)(diff)?'" set -g @continuum-restore 'on' set -g @continuum-save-interval '5' set -g @resurrect-strategy-nvim 'session' set -g @resurrect-capture-pane-contents 'on' set -g @resurrect-processes 'ssh "git log" "just n" "just nvim" "just e" "just edit" lf aerc bat difft delta' set-environment -g TMUX_PLUGIN_MANAGER_PATH '~/.local/share/tmux/plugins' if "test ! -d ~/.local/share/tmux/plugins/tpm" \ "run 'git clone https://github.com/tmux-plugins/tpm ~/.local/share/tmux/plugins/tpm && ~/.local/share/tmux/plugins/tpm/bin/install_plugins'" # Initialize TMUX plugin manager (keep this line at the very bottom of tmux.conf) run '~/.local/share/tmux/plugins/tpm/tpm' # The default key bindings include which is the readline key binding # for clearing the screen. The following binding can be added to your # ~/.tmux.conf file to provide an alternate mapping to clear-screen. bind C-l send-keys 'C-l'