Skip to content

Instantly share code, notes, and snippets.

@bholt
Created October 28, 2015 00:45
Show Gist options
  • Save bholt/4aec3db1ea1f30229ea7 to your computer and use it in GitHub Desktop.
Save bholt/4aec3db1ea1f30229ea7 to your computer and use it in GitHub Desktop.
Put this in your home directory (~/.tmux.conf). Make "ctrl+t" the global tmux shortcut, makes splits easier by creating shortcuts for "ctrl+t, -" to split horizontal and "ctrl+t, |" (pipe) for vertical.
# start a new session if there isn't one to attach to already
new-session
# Make global tmux shortcut "ctrl+t"
set -g prefix ^t
# Renumber windows when they're closed so you don't have weird missing numbers.
set-option -g renumber-windows on
# Make colors work right.
set -g default-terminal "screen-256color"
unbind %
# More natural split shortcuts "-" for vertical, "|" for horizontal
bind | split-window -h
bind - split-window -v
bind ^l resize-pane -L 5
bind ^r resize-pane -R 5
bind ^u resize-pane -U 5
bind ^d resize-pane -D 5
# Save lots of history.
set -g history-limit 1000000
bind h select-pane -L
bind j select-pane -D
bind k select-pane -U
bind l select-pane -R
# Enable mouse
set-option -g mouse-resize-pane on
set-option -g mouse-select-pane on
set-option -g mouse-select-window on
set-option -g mode-mouse on
# My status bar config, pretty straightforward.
set -g status-bg black
set -g status-fg white
set-window-option -g window-status-current-bg white
set-window-option -g window-status-current-fg black
set -g pane-border-fg black
set -g pane-active-border-fg black
set -g pane-border-bg default
set -g pane-active-border-bg default
set -g status-left-length 52
set -g status-right-length 451
set -g status-fg white
set -g status-bg colour234
set -g window-status-activity-attr bold
set -g message-fg colour16
set -g message-bg colour221
set -g message-attr bold
set -g status-left '#[fg=colour235,bg=colour252,bold] #S #[fg=colour252,bg=colour238,nobold]#[fg=colour245,bg=colour238,bold] #(whoami) #[fg=colour238,bg=colour234,nobold]'
set -g window-status-format "#[fg=white,bg=colour234] #I #W "
set -g window-status-current-format "#[fg=colour234,bg=colour39]#[fg=colour25,bg=colour39,noreverse,bold] #I #W #[fg=colour39,bg=colour234,nobold]"
set -g status-right '#[fg=colour235,bg=colour252,nobold] #(date +"%a %l:%M") '
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment