Skip to content

Instantly share code, notes, and snippets.

@grekko
Last active December 29, 2015 08:19
Show Gist options
  • Save grekko/7643051 to your computer and use it in GitHub Desktop.
Save grekko/7643051 to your computer and use it in GitHub Desktop.
My tmux conf example file which I use on several servers
# using vi mode keys
setw -g mode-keys vi
# color settings
set -g default-terminal "screen-256color"
set -g pane-active-border-fg yellow
unbind q
bind q kill-window
# powerline settings taken from powerline.conf (by powerline git repos)
set -g status on
set -g status-utf8 on
set -g status-interval 2
set -g status-fg colour231
set -g status-bg colour234
set -g status-left-length 20
set -g status-left '#[fg=colour16,bg=colour254,bold] #S #[fg=colour254,bg=colour234,nobold]|'
set -g window-status-format "#[fg=colour244,bg=colour234]#I#[fg=colour240]|#[fg=colour249]#W"
set -g window-status-current-format "#[fg=colour117,bg=colour31] [#I] #[fg=colour231,bold]#W "
# bindings
bind h select-pane -L
bind j select-pane -D
bind k select-pane -U
bind l select-pane -R
# using C-b
set-option -g prefix C-b
# Just click it
set-option -g mouse-select-pane on
set-option -g mouse-select-window on
set-option -g mouse-resize-pane on
set -g mouse-utf8 on
# window index starting with 1 instead of 0
set -g base-index 1
# Activating mouse support
set-option -g mouse-select-pane on
set-option -g mouse-select-window on
set-option -g mouse-resize-pane on
set -g mouse-utf8 on
# Scroll your way into copy mode (scrollback buffer)
# and select text for copying with the mouse
setw -g mode-mouse on
# open current pane in a new window (zooming hack for tmux < 1.8 which introduced actual zooming!)
unbind +
bind + new-window -d -n tmux-zoom 'clear && echo TMUX ZOOM && read' \; swap-pane -s tmux-zoom.0 \; select-window -t tmux-zoom
unbind -
bind - last-window \; swap-pane -s tmux-zoom.0 \; kill-window -t tmux-zoom
# quick pane cycling
unbind ^b
bind ^b select-pane -t :.+
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment