Skip to content

Instantly share code, notes, and snippets.

@martin2844
Created June 15, 2025 21:01
Show Gist options
  • Save martin2844/5cae7e93a30660b464d45399accd7221 to your computer and use it in GitHub Desktop.
Save martin2844/5cae7e93a30660b464d45399accd7221 to your computer and use it in GitHub Desktop.
tmux dotfile
set -g mouse on
# Set vi-style key bindings
setw -g mode-keys vi
# Easily switch panes
bind h select-pane -L
bind j select-pane -D
bind k select-pane -U
bind l select-pane -R
# Resize panes using Alt + arrow keys
bind -r M-h resize-pane -L 5
bind -r M-j resize-pane -D 5
bind -r M-k resize-pane -U 5
bind -r M-l resize-pane -R 5
# Enable clipboard access
set-option -g set-clipboard on
# Enable Vim-style copy and clipboard integration
bind -T copy-mode-vi v send -X begin-selection
bind -T copy-mode-vi y send -X copy-pipe-and-cancel "pbcopy"
# Status bar settings
set -g status-bg blue
set -g status-fg white
set -g status-left '#[fg=green]#S #[fg=white]|'
set -g status-right '#[fg=yellow]%Y-%m-%d #[fg=cyan]%H:%M#[fg=white]'
set -g status-interval 10
# Reload tmux config
bind r source-file ~/.tmux.conf \; display-message "Tmux config reloaded!"
# Start tmux with a larger history buffer
set-option -g history-limit 10000
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment