Skip to content

Instantly share code, notes, and snippets.

@danibram
Created November 13, 2015 16:19
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save danibram/dfb508256638f0cb2649 to your computer and use it in GitHub Desktop.
Save danibram/dfb508256638f0cb2649 to your computer and use it in GitHub Desktop.
setw -g aggressive-resize 0
#Reload tmux conf
bind-key r source-file ~/.tmux.conf \; display "Config reloaded!"
# Remap prefix to Control + a
# set -g prefix §
set -g prefix C-a
unbind C-b
bind C-a send-prefix
# Less stretching to get to the first item.
set -g base-index 1
setw -g pane-base-index 1
# Quick pane cycling
unbind ^A
bind ^A select-pane -t :.+
# Use Alt-vim keys without prefix key to switch panes
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
# Use Alt-arrow keys without prefix key to switch panes
bind -n M-Left select-pane -L
bind -n M-Right select-pane -R
bind -n M-Up select-pane -U
bind -n M-Down select-pane -D
# Shift arrow to switch windows
bind -n S-Left previous-window
bind -n S-Right next-window
# Use Vi mode
setw -g mode-keys vi
set -g status-keys vi
# More straight forward key bindings for splitting
unbind %
bind | split-window -h
unbind '"'
bind _ split-window -v
# Terminal emulator window title
set -g set-titles on
set -g set-titles-string '#S:#I.#P #W'
# UTF8
set -g status-utf8 on
# Terminal junks!
set -g default-terminal "screen-256color"
# Bad Wolf
set -g status-fg colour179
set -g status-bg colour235
set -g window-status-activity-attr bold
set -g pane-border-fg colour245
set -g pane-active-border-fg colour39
set -g message-fg colour16
set -g message-bg colour221
set -g message-attr bold
# Custom status bar
set-option -g status on # turn the status bar on
set -g status-utf8 on # set utf-8 for the status bar
set -g status-interval 5 # set update frequencey (default 15 seconds)
set -g status-justify centre # center window list for clarity
# set-option -g status-position top # position the status bar at top of screen
# visual notification of activity in other windows
setw -g monitor-activity on
set -g visual-activity on
# set color for status bar
set-option -g status-bg colour235
set-option -g status-fg colour179
set-option -g status-attr default
# set window list colors - red for active and cyan for inactive
set-window-option -g window-status-fg brightblue #base0
set-window-option -g window-status-bg colour235
set-window-option -g window-status-attr dim
set-window-option -g window-status-current-fg brightred #orange
set-window-option -g window-status-current-bg colour235
set-window-option -g window-status-current-attr bright
# show host name and IP address on left side of status bar
set -g status-left-length 70
set -g status-left "#[fg=red]❩#[fg=green]❩#[fg=yellow]❩ #[fg=yellow]#h : #[fg=default]#(curl icanhazip.com) #[fg=yellow]#(ifconfig en0 | grep 'inet ' | awk '{print \"en0 \" $2}') #(ifconfig en1 | grep 'inet ' | awk '{print \"en1 \" $2}') #[fg=yellow]#(ifconfig tun0 | grep 'inet ' | awk '{print \"vpn \" $2}') "
# show session name, window & pane number, date and time on right side of
# status bar
set -g status-right-length 200
set -g status-right "#[fg=green] #(tmux-mem-cpu-load) #[fg=yellow]:: #[fg=default]#S #I:#P #[fg=yellow]:: %H:%M %e %b %Y ::"
# Activity
setw -g monitor-activity on
set -g visual-activity on
# Autorename sanely.
setw -g automatic-rename on
# Don't prompt for killing panes and windows
bind-key x kill-pane
bind-key & kill-window
# Scrollback lines
set-option -g history-limit 3000
# Mouse
set-option -g mouse on
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment