Skip to content

Instantly share code, notes, and snippets.

@lexoyo
Forked from spicycode/tmux.conf
Last active December 12, 2015 16:16
Show Gist options
  • Save lexoyo/c2b2f852198466ef639d to your computer and use it in GitHub Desktop.
Save lexoyo/c2b2f852198466ef639d to your computer and use it in GitHub Desktop.
The best and greatest tmux.conf ever
set-option -g prefix C-a
unbind-key C-b
# 0 is too far from ` ;)
set -g base-index 1
# Automatically set window title
set-window-option -g automatic-rename on
set-option -g set-titles on
#set -g default-terminal screen-256color
set -g status-keys vi
set -g history-limit 10000
#vim for copy and visual mode
setw -g mode-keys vi
setw -g mode-keys vi
bind-key -t vi-copy 'v' begin-selection
bind-key -t vi-copy 'y' copy-selection
#setw -g mode-mouse on
#setw -g monitor-activity on
# copy to system buffer (alt-y will copy the last buffer to system clipboard)
# requires xclip installed
bind -n M-y run-shell "tmux show-buffer | xclip -sel clip -i > /dev/null" \; display-message "Copied tmux buffer to system clipboard"
# enter selection mode with alt v
bind -n M-v copy-mode
# Use Alt-vim keys without prefix key to switch panes
bind -n M-h resize-pane -L
bind -n M-j resize-pane -D
bind -n M-k resize-pane -U
bind -n M-l resize-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
bind -n M-x kill-pane
# Shift arrow to switch windows
bind -n S-Left previous-window
bind -n S-Right next-window
# No delay for escape key press
set -sg escape-time 0
# Reload tmux config
bind r source-file ~/.tmux.conf
# THEME
set -g status-bg black
set -g status-fg white
set -g window-status-current-bg white
set -g window-status-current-fg black
set -g window-status-current-attr bold
set -g status-interval 60
set -g status-left-length 30
set -g status-left '#[fg=green](#S) #(whoami)'
set -g status-right '#[fg=yellow]#(cut -d " " -f 1-3 /proc/loadavg)#[default] #[fg=white]%H:%M#[default]'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment