Skip to content

Instantly share code, notes, and snippets.

@arielcr
Last active July 3, 2025 20:27
Show Gist options
  • Save arielcr/acb596509a5502adc315a083c82ab3c7 to your computer and use it in GitHub Desktop.
Save arielcr/acb596509a5502adc315a083c82ab3c7 to your computer and use it in GitHub Desktop.
MY TMUX.CONF
set -g default-terminal "screen-256color"
set -sa terminal-overrides "*:Tc"
set -g @tmux_power_theme 'everforest'
# change window numbering
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
## remap prefix from 'C-b' to 'C-a'
unbind C-b
set-option -g prefix C-a
bind-key C-a send-prefix
## split panes using | and -
bind | split-window -h
bind - split-window -v
unbind '"'
unbind %
## reload config file (change file location to your the tmux.conf you want to use)
unbind r
bind r source-file ~/.tmux.conf
## hide the status bar
#bind x set-option -g status
## allow terminal scrolling
set-option -g terminal-overrides 'xterm*:smcup@:rmcup@'
## resize the pane
bind-key -r J resize-pane -D 3
bind-key -r K resize-pane -U 3
bind-key -r H resize-pane -L 3
bind-key -r L resize-pane -R 3
## switch panes using Alt-arrow without prefix
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
# Zoom pane
bind -n C-z resize-pane -Z
set -g mouse on
# Handling mouse
set -g mouse on
# Fix Mouse Scrolling: https://github.com/tmux/tmux/issues/145
bind -n WheelUpPane if-shell -F -t = "#{mouse_any_flag}" "send-keys -M" "if -Ft= '#{pane_in_mode}' 'send-keys -M' 'select-pane -t=; copy-mode -e; send-keys -M'"
bind -n WheelDownPane select-pane -t= \; send-keys -M
# List of plugins
set -g @plugin 'tmux-plugins/tpm'
set -g @plugin 'tmux-plugins/tmux-sensible'
set -g @plugin 'christoomey/vim-tmux-navigator'
set -g @plugin 'wfxr/tmux-power'
# Other examples:
# set -g @plugin 'github_username/plugin_name'
# set -g @plugin 'github_username/plugin_name#branch'
# set -g @plugin '[email protected]:user/plugin'
# set -g @plugin '[email protected]:user/plugin'
# Initialize TMUX plugin manager (keep this line at the very bottom of tmux.conf)
run '~/.tmux/plugins/tpm/tpm'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment