# fIX TERMINAL set-option -ga terminal-overrides ",xterm-256color:Tc:allow-passthrough" set -g xterm-keys on set -g allow-passthrough on set -ga update-environment TERM set -ga update-environment TERM_PROGRAM set -g history-limit 4000 # Enable clipboard for wayland set-option -g set-clipboard on bind-key -T copy-mode-vi y send-keys -X copy-pipe-and-cancel "wl-copy" bind-key -T copy-mode-vi Enter send-keys -X copy-pipe-and-cancel "wl-copy" # Style unused terminal panes set -g window-style 'fg=colour247,bg=colour236' set -g window-active-style 'fg=colour250,bg=black' set -g pane-border-lines "double" # Vim keys in copy mode set -g mode-keys vi # Automatic continuum-restore set -g @continuum-restore 'on' # Automatic window name setw -g automatic-rename-format "#{b:pane_current_path}" # Automatic pane name that also allows custom pane title in the beginning set -g pane-border-status top # Rename pane keybinding (yes select-pane is misleading) bind r command-prompt -I "" "select-pane -T '%%'" # Easier to enter scroll mode bind -n C-0 copy-mode # Set the session to the current pane's directory bind a attach -c "#{pane_current_dir}" # Close pane with alt q bind -n M-q kill-pane # New panes with alt bind -n M-n split-window -v bind -n M-N split-window -h # Vim like resizing with shift alt bind -n M-H resize-pane -L 5 bind -n M-J resize-pane -D 5 bind -n M-K resize-pane -U 5 bind -n M-L resize-pane -R 5 # Vim like movements with alt bind -n M-h select-pane -L bind -n M-l select-pane -R bind -n M-k select-pane -U bind -n M-j select-pane -D # Zoom with simple alt f bind -n M-f resize-pane -Z # New stuff opens in same directory as starting pane bind \" split-window -c "#{pane_current_path}" bind % split-window -h -c "#{pane_current_path}" bind c new-window -c "#{pane_current_path}" # No more confirmation to close things bind x kill-pane bind & kill-window # Remove accidental cycle windows unbind -T prefix Space # popups bind h display-popup -E -w 95% -h 95% -T "Htop" htop bind g display-popup -E -w 95% -h 95% -T "Lazygit" -d "#{pane_current_path}" lazygit bind D display-popup -E -w 95% -h 95% -T "Docker Stats" docker stats bind S display-popup -E -w 95% -h 95% -T "System" systemctl-tui bind u display-popup -E -w 95% -h 95% -T "Upload Dotfiles" -d "$HOME/.dotfiles" "$HOME/.dotfiles/sync-then-lazygit.sh" # Resurrect settings set -g @continuum-save-interval '10' set -g @resurrect-processes 'false' # Force continuum save via hook since powerline owns status-right set-hook -g pane-focus-in 'run-shell -b "~/.config/tmux/plugins/tmux-continuum/scripts/continuum_save.sh"' # List of plugins set -g @plugin 'tmux-plugins/tpm' set -g @plugin 'tmux-plugins/tmux-sensible' set -g @plugin 'tmux-plugins/tmux-resurrect' set -g @plugin 'tmux-plugins/tmux-continuum' set -g @plugin 'erikw/tmux-powerline' set -g @plugin 'huncholane/tmux-fzf-keys' set -g @plugin 'omerxx/tmux-sessionx' set -g @plugin 'Morantron/tmux-fingers' # Initialize TMUX plugin manager (keep this line at the very bottom of tmux.conf) run '~/.config/tmux/bootstrap-tpm.sh'