Skip to content

Instantly share code, notes, and snippets.

@onionka
Created November 28, 2022 11:27
Show Gist options
  • Save onionka/b0e342cb062e16c9445f46e4eb8d2166 to your computer and use it in GitHub Desktop.
Save onionka/b0e342cb062e16c9445f46e4eb8d2166 to your computer and use it in GitHub Desktop.
TMUX v1.8+ config
# Use 256 colors instead of 16, which is tmux default, no matter on which terminal it is running
set -g default-terminal "screen-256color"
set-option -sa terminal-overrides ',screen-256color:RGB'
# Vi keys to control copy mode
set-window-option -g mode-keys vi
# Reload config file (change file location to your the tmux.conf you want to use)
bind r source-file ~/.tmux.conf
# Don't rename windows automatically
set-option -g allow-rename off
# Long history limit
set -g history-limit 50000
bind-key C-x set-window-option synchronize-panes
# New panes and windows in the same path
bind c new-window -c "#{pane_current_path}"
bind '"' split-window -c "#{pane_current_path}"
bind % split-window -h -c "#{pane_current_path}"
# Windows movements
bind C-Down swap-window -t -1
bind C-Up swap-window -t +1
# Tilled panes layout
bind C-t select-layout tiled
bind C-n next-layout
bind C-p next-layout
# Pane resizing
bind J resize-pane -D 5
bind K resize-pane -U 5
bind H resize-pane -L 5
bind L resize-pane -R 5
# Vim style pane selection
bind h select-pane -L
bind j select-pane -D
bind k select-pane -U
bind l select-pane -R
# status bar
set -g status-bg colour234
set -g status-fg white
setw -g window-status-current-bg black
setw -g window-status-current-fg white
setw -g window-status-last-bg black
setw -g window-status-last-fg colour200
setw -g window-status-bg black
setw -g window-status-fg colour200
# pane border
set -g pane-border-fg colour237
set -g pane-active-border-fg colour55
# message text
set -g message-bg colour234
set -g message-fg brightblue
set -g message-command-bg colour234
set -g message-command-fg green
# monitor activity
setw -g monitor-activity on
set -g visual-activity off
set -g window-status-activity-attr bold
setw -g window-status-activity-bg colour234
setw -g window-status-activity-fg brightblue
# mode colors
set -g mode-bg colour67
set -g mode-fg colour235
set -g window-status-format "#I  #W "
set -g window-status-current-format "#I  #W "
set -g status-interval 2
set -g status-left-length 55
set -g status-right-length 150
set -g status-utf8 on
set -g status-left '#[default,fg=blue,bold] #S #[default] '
set -g status-right '#[fg=blue]#22T │ CPU:#(top -bn2 | head -n1 | cut -d":" -f5 | tr ", " " ") │ %H:%M#[default]'
setw -g window-status-separator ' '
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment