Skip to content

Instantly share code, notes, and snippets.

@jmmastey
Created February 15, 2016 21:55
Show Gist options
  • Save jmmastey/7e5b8e147b06617a57e4 to your computer and use it in GitHub Desktop.
Save jmmastey/7e5b8e147b06617a57e4 to your computer and use it in GitHub Desktop.
# C-b is not acceptable, make it C-w
set -g prefix C-w
bind C-w send-prefix
#bind-key C-w last-window
# navigate windows
bind-key -n F11 previous-window
bind-key -n F12 next-window
# start numbering at 1
set -g base-index 1
# allows for faster key repetition
set -s escape-time 0
# rather than constraining window size to the maximum size of any client
# connected to the *session*, constrain window size to the maximum size of any
# client connected to *that window*. Much more reasonable.
setw -g aggressive-resize on
# hjkl pane traversal and alt arrow
bind h select-pane -L
bind j select-pane -D
bind k select-pane -U
bind l select-pane -R
bind -n M-h select-pane -L
bind -n M-j select-pane -D
bind -n M-k select-pane -U
bind -n M-l select-pane -R
# window splitting
bind-key s split-window -h
bind-key v split-window
# choose session
bind-key -n M-0 choose-session
# pane resizing - hold ALT + arrows
bind-key -nr M-Up resize-pane -U
bind-key -nr M-Down resize-pane -D
bind-key -nr M-Left resize-pane -L
bind-key -nr M-Right resize-pane -R
# reload config
bind r source-file ~/.tmux.conf
# auto window rename
set-window-option -g automatic-rename
# color
set -g default-terminal "screen-256color"
set-option -g mouse-select-pane on
set-window-option -g mode-mouse on
set -g terminal-overrides 'xterm*:smcup@:rmcup@'
# set status bar
set-option -g status-utf8 on
set-option -g status-bg colour234
set-option -g status-fg colour248
set-option -g status-left '#[fg=colour70]⣿'
#set-option -g status-right '⡇ #[bold]❐ #S:#I#[default] ⡇ #[bold]#(whoami) ● #H#[default] '
set-option -g status-right '❐ #S #[fg=colour70]⡇ #[fg=colour248]❖ #(rvm tools identifier) #[fg=colour70]⡇ #[fg=colour248]#(whoami) ● #H #[fg=colour70]⡇ #[fg=colour248]%m/%d/%Y - #[bold]%I:%M '
#set-option -g status-left ' #[bold]❐ #S#[default] ⡇'
#set-option -g status-right '#[bold]#(whoami) ● #H#[default] '
set-option -g status-right-length 90
set-option -g status-left-length 60
# highlight active window
set-window-option -g window-status-current-bg colour0
set-window-option -g window-status-current-fg colour15
set-window-option -g window-status-current-attr bold
set-window-option -g window-status-current-format ' #I #W '
# set window notifications
set-option -g visual-activity on
set-option -g visual-content on
set-window-option -g monitor-activity on
set-window-option -g automatic-rename on
# tmux window titling for X
set-option -g set-titles on
set-option -g set-titles-string '[#I] #W'
set-window-option -g automatic-rename on
set-window-option -g window-status-format ' #I #W '
set-window-option -g window-status-attr bold
# starts windows at 1 not 0
set-option -g base-index 1
# enable mouse
set-option -g mouse-select-pane on
set-window-option -g mode-keys vi
set-window-option -g mode-mouse on
# pane border and colors
set-option -g pane-active-border-fg black
set-option -g pane-border-fg white
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment