Skip to content

Instantly share code, notes, and snippets.

@vsobotka
Last active June 21, 2017 13:49
Show Gist options
  • Save vsobotka/750a5e26cd7b8699879b0ab708e03feb to your computer and use it in GitHub Desktop.
Save vsobotka/750a5e26cd7b8699879b0ab708e03feb to your computer and use it in GitHub Desktop.
# Change prefix from C-a from C-b
set -g prefix C-a
# Prefix has been remapped, C-b can be unbinded
unbind C-b
# Reduces the delay; more responsive command execution
set -s escape-time 1
# Indexing from 1 instead of 0
set -g base-index 1
set -g pane-base-index 1
# C-a r to reaload configuration file to reflect changes
bind r source-file ~/.tmux.conf \; display "Reloaded!"
# If needed, C-a used as prefix for tmux can be send to application running inside tmux bz pressing C-a C-a, ergo twice
bind C-a send-prefix
# Custom keys for splits
bind | split-window -h
bind - split-window -v
# Custom pane selection keys
bind h select-pane -L
bind j select-pane -U
bind k select-pane -D
bind l select-pane -R
# Custom cycle-through-windows keys
bind -r C-h select-window -t :-
bind -r C-l select-window -t :+
# Custom pane-resize keys, repeatable
bind -r H resize-pane -L 5
bind -r J resize-pane -U 5
bind -r K resize-pane -D 5
bind -r L resize-pane -R 5
# Enable mouse
# setw -g mouse on
# set -g mouse-select-pane on
# set -g mouse-resize-pane on
# set -g mouse-select-window on
# Or not
setw -g mouse off
# Enable propper colours
# Running tmux as tmux -2 may be needed; alias tmux="tmux -2"
set -g default-terminal "xterm"
# Change window list colours
setw -g window-status-fg cyan
setw -g window-status-bg default
setw -g window-status-attr dim
setw -g window-status-current-fg white
setw -g window-status-current-bg red
setw -g window-status-current-attr bright
# Change colour of pane dividers
set -g pane-border-fg green
set -g pane-border-bg black
set -g pane-active-border-fg "#5F00D7"
set -g pane-active-border-bg "#5F00D7"
# Customize command line colours
set -g message-fg white
set -g message-bg black
set -g message-attr bright
# Customize status bar
set -g status-left-length 40
set -g status-left "#[fg=green]Session: #S #[fg=yellow]#I #[fg=cyan]#P"
set -g status-right "#[fg=cyan]%d %b %R"
set -g status-utf8 on
set -g status-interval 60
set -g status-bg colour238
set -g status-justify centre
setw -g monitor-activity on
set -g visual-activity on
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment