Skip to content

Instantly share code, notes, and snippets.

@mproffitt
Last active April 18, 2017 06:05
Show Gist options
  • Save mproffitt/186beb408d3f888637c1399cd54002c7 to your computer and use it in GitHub Desktop.
Save mproffitt/186beb408d3f888637c1399cd54002c7 to your computer and use it in GitHub Desktop.
My Tmux configuration
# test
unbind C-b
set -g prefix C-a
# use "v" and "s" to do vertical/horizontal splits, like vim
bind s split-window -v
bind v split-window -h
# use the vim motion keys to move between panes
bind h select-pane -L
bind j select-pane -D
bind k select-pane -U
bind l select-pane -R
set-option -g mouse on
# shorten the escape time for better mouse scrolling
set -s escape-time 1
# toggle synchronized view
bind-key y set-window-option synchronize-panes
setw -g mode-keys vi
bind -r < resize-pane -L 1
bind -r > resize-pane -R 1
bind -r + resize-pane -U 1
bind -r - resize-pane -D 1
set-option -g status-left '#[fg=colour240]#S:#I |'
set-window-option -g window-status-format '#[fg=colour240]#F#[fg=default]#W#[fg=colour240]#F'
set-window-option -g window-status-current-format '#[fg=colour240]#F#[fg=default]#W#[fg=colour240]#F'
set-option -g status-right '#[fg=colour240]| %a %b %d %I:%M %p'
set-option -g status-bg colour234
set-option -g status-fg colour007
set-window-option -g window-status-current-fg colour208
set-option -g status-right-length 300
# attempt to set the window title
set-option -g set-titles on
set-option -g set-titles-string 'tmux on #H'
#
# # use a large scrollback history
set-option -g history-limit 10000
#
# clear the scrollback history with <Ctrl-k>
bind-key C-k clear-history
#run-shell "powerline-daemon -q"
source ~/.local/lib/python2.7/site-packages/powerline/bindings/tmux/powerline.conf
set-option -g default-terminal "screen-256color"
# tmux plugin support
set -g @tpm_plugins ' \
tmux-plugins/tpm \
tmux-plugins/tmux-sensible \
tmux-plugins/tmux-resurrect \
tmux-plugins/tmux-continuum \
'
# auto-restore session with tmux-continuum and tmux-resurrect
set -g @continuum-boot 'on'
set -g @continuum-boot-options 'guake'
set -g @continuum-restore 'on'
# Initializes TMUX plugin manager.
run-shell '~/.tmux/plugins/tpm/tpm'
# Set up vim style clipboard and motion
bind-key -Tcopy-mode-vi v send -X begin-selection
bind-key -Tcopy-mode-vi y send -X copy-pipe-and-cancel "xclip -sel clip -i"
bind-key ] run-shell "xclip -sel clip -o | tmux load-buffer - ; tmux paste-buffer"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment