Add configuration for tmux.
This commit is contained in:
93
tmux/tmux.conf
Normal file
93
tmux/tmux.conf
Normal file
@@ -0,0 +1,93 @@
|
|||||||
|
# Set prefix to Ctrl-a (easier to reach than Ctrl-b)
|
||||||
|
unbind C-b
|
||||||
|
set-option -g prefix C-a
|
||||||
|
bind-key C-a send-prefix
|
||||||
|
|
||||||
|
# Enable mouse support
|
||||||
|
set -g mouse on
|
||||||
|
|
||||||
|
# Set base index to 1 (instead of 0)
|
||||||
|
set -g base-index 1
|
||||||
|
setw -g pane-base-index 1
|
||||||
|
|
||||||
|
# Renumber windows when one is closed
|
||||||
|
set -g renumber-windows on
|
||||||
|
|
||||||
|
# Increase scrollback buffer size
|
||||||
|
set -g history-limit 50000
|
||||||
|
|
||||||
|
# Enable 256 colors and true color support
|
||||||
|
set -g default-terminal "screen-256color"
|
||||||
|
set -ga terminal-overrides ",*256col*:Tc"
|
||||||
|
|
||||||
|
# Faster key repetition
|
||||||
|
set -s escape-time 0
|
||||||
|
|
||||||
|
# Split panes using | and -
|
||||||
|
bind | split-window -h -c "#{pane_current_path}"
|
||||||
|
bind - split-window -v -c "#{pane_current_path}"
|
||||||
|
unbind '"'
|
||||||
|
unbind %
|
||||||
|
|
||||||
|
# Easy pane navigation with vim-like keys
|
||||||
|
bind h select-pane -L
|
||||||
|
bind j select-pane -D
|
||||||
|
bind k select-pane -U
|
||||||
|
bind l select-pane -R
|
||||||
|
|
||||||
|
# Resize panes with vim-like keys
|
||||||
|
bind -r H resize-pane -L 5
|
||||||
|
bind -r J resize-pane -D 5
|
||||||
|
bind -r K resize-pane -U 5
|
||||||
|
bind -r L resize-pane -R 5
|
||||||
|
|
||||||
|
# Easy window navigation
|
||||||
|
bind -r C-h select-window -t :-
|
||||||
|
bind -r C-l select-window -t :+
|
||||||
|
|
||||||
|
# Reload config file
|
||||||
|
bind r source-file ~/.config/tmux/tmux.conf \; display "Config reloaded!"
|
||||||
|
|
||||||
|
# Enable vi mode in copy mode
|
||||||
|
setw -g mode-keys vi
|
||||||
|
|
||||||
|
# Copy mode bindings
|
||||||
|
bind Enter copy-mode
|
||||||
|
bind -T copy-mode-vi v send-keys -X begin-selection
|
||||||
|
bind -T copy-mode-vi y send-keys -X copy-selection-and-cancel
|
||||||
|
bind -T copy-mode-vi Escape send-keys -X cancel
|
||||||
|
|
||||||
|
# Status bar customization
|
||||||
|
set -g status-position bottom
|
||||||
|
set -g status-style 'bg=colour235 fg=colour137'
|
||||||
|
set -g status-left '#[fg=colour233,bg=colour245,bold] #S '
|
||||||
|
set -g status-right '#[fg=colour233,bg=colour241,bold] %d/%m #[fg=colour233,bg=colour245,bold] %H:%M:%S '
|
||||||
|
set -g status-right-length 50
|
||||||
|
set -g status-left-length 20
|
||||||
|
|
||||||
|
# Window status
|
||||||
|
setw -g window-status-current-style 'fg=colour81 bg=colour238 bold'
|
||||||
|
setw -g window-status-current-format ' #I#[fg=colour250]:#[fg=colour255]#W#[fg=colour50]#F '
|
||||||
|
setw -g window-status-style 'fg=colour138 bg=colour235'
|
||||||
|
setw -g window-status-format ' #I#[fg=colour237]:#[fg=colour250]#W#[fg=colour244]#F '
|
||||||
|
|
||||||
|
# Pane borders
|
||||||
|
set -g pane-border-style 'fg=colour238'
|
||||||
|
set -g pane-active-border-style 'fg=colour51'
|
||||||
|
|
||||||
|
# Messages
|
||||||
|
set -g message-style 'fg=colour232 bg=colour166 bold'
|
||||||
|
|
||||||
|
# Activity monitoring
|
||||||
|
setw -g monitor-activity on
|
||||||
|
set -g visual-activity off
|
||||||
|
|
||||||
|
# Automatically set window title
|
||||||
|
set-window-option -g automatic-rename on
|
||||||
|
set-option -g set-titles on
|
||||||
|
|
||||||
|
# Focus events (for vim integration)
|
||||||
|
set -g focus-events on
|
||||||
|
|
||||||
|
# Keep current path when creating new windows
|
||||||
|
bind c new-window -c "#{pane_current_path}"
|
||||||
Reference in New Issue
Block a user