Created
September 16, 2015 14:05
-
-
Save jjrussell/39cb55f721ad6c9c9116 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
############################################################# | |
## | |
## tmux plugins | |
## | |
############################################################# | |
# plugin options | |
# https://github.com/tmux-plugins/tmux-continuum | |
# tmux session saving and auto restore | |
set -g @continuum-restore 'on' | |
unbind C-b | |
set -g prefix C-v | |
bind-key R source-file ~/.tmux.conf \; refresh-client -S \; display-message "Sourced config file ~/.tmux.conf" | |
# bind-key C-v last-window | |
# set default name for new windows | |
unbind c | |
bind-key c new-window -n "new" | |
unbind % | |
bind-key | split-window -h | |
bind-key \ split-window -h | |
bind-key - split-window -v | |
bind-key s set -g synchronize-panes | |
bind-key W source-file ~/.tmux.scripts/work | |
# when a window closes, renumber what's left to the lowest available index | |
set-option -g renumber-windows on | |
# if this is on we get to use the scroll wheel but selecting uses the tmux | |
# paste buffer. I think I prefer mouse selecting copy/paste to mouse scrolling | |
# Use prefix-pgup | |
#set -g mode-mouse off | |
# Mouse support | |
set -g mode-mouse on # Enable mouse mode | |
set-option -g mouse-select-pane on | |
set-option -g mouse-resize-pane on | |
set-option -g mouse-select-window on | |
set-window-option -g mode-mouse on | |
set -g mouse-utf8 off # Avoid junk character insertions on mouse clicks | |
# keeps commands from running and clobbering window name | |
# set-window-option -g automatic-rename off | |
# https://github.com/ChrisJohnsen/tmux-MacOSX-pasteboard | |
# set-option -g default-command "reattach-to-user-namespace-tmux -l zsh" # or bash... | |
# replaced by tmux-yank | |
# put tmux paste buffer in the native buffer | |
#bind C-c run "tmux save-buffer - | reattach-to-user-namespace pbcopy" \; display-message "tmux clipboard copied to native clipboard" | |
# automatically put whatever we copy from tmux into the native copy paste buffer | |
# Had to turn this off because if we use tmux-resurrect it puts stuff in the tmux paste buffer and | |
# when it does it clobbers whatever we had there, once a minute. Annoying. | |
# Using C-c above does this manually. | |
# unbind-key -t emacs-copy M-w | |
# bind-key -t emacs-copy M-w copy-pipe "reattach-to-user-namespace pbcopy" | |
bind b run "open $(tmux save-buffer -)" | |
# hrm, can't get this to work. Exits with 1 | |
bind B run "tmux rename-window $(git symbolic-ref HEAD)" | |
#bind C-v run "reattach-to-user-namespace pbpaste | tmux load-buffer - && tmux paste-buffer" | |
# Display the pane numbers upto 10s | |
set -g display-panes-time 10000 | |
# set -g status-bg black | |
# set -g status-fg white | |
# set -g status-interval 30 | |
# set -g status-left-length 30 | |
# set -g status-left ' ' | |
# #set -g status-right '#(cut -d " " -f 1-3 /proc/loadavg) %Y-%m-%d %H:%M' | |
# set -g status-right '%Y-%m-%d %H:%M' | |
# set-window-option -g window-status-current-bg white | |
# set-window-option -g window-status-current-fg black | |
#highlight active pane | |
set -g pane-border-bg black | |
set -g pane-border-fg white | |
set -g pane-active-border-bg blue | |
set -g pane-active-border-fg white | |
# powerline config | |
# if-shell 'test -z "$POWERLINE_COMMAND"' 'if-shell "which powerline-client" "set-environment -g POWERLINE_COMMAND powerline-client" "set-environment -g POWERLINE_COMMAND powerline"' | |
set-environment -g POWERLINE_COMMAND powerline | |
set -g status on | |
set -g status-utf8 on | |
set -g status-interval 2 | |
set -g status-fg colour231 | |
set -g status-bg colour234 | |
set -g status-left-length 20 | |
set -g status-left '#[fg=colour16,bg=colour254,bold] #S #[fg=colour254,bg=colour234,nobold]#(eval $POWERLINE_COMMAND tmux left)' | |
# Too wide, not any useful info | |
# set -g status-right '#(eval $POWERLINE_COMMAND tmux right -R pane_id=`tmux display -p "#D"`)' | |
# set -g status-right-length 150 | |
set -g window-status-format "#[fg=colour244,bg=colour234]#I #[fg=colour240] #[default]#W #F " | |
set -g window-status-current-format "#[fg=colour234,bg=colour31]#[fg=colour117,bg=colour31] #I #[fg=colour231,bold]#W #F #[fg=colour31,bg=colour234,nobold]" | |
#set -g window-status-current-format "#[fg=colour234,bg=colour31]#[fg=colour117,bg=colour31] #I #[fg=colour231,bold]#W #[fg=colour31,bg=colour234,nobold]" | |
set-window-option -g window-status-fg colour249 | |
set-window-option -g window-status-activity-attr none | |
set-window-option -g window-status-bell-attr none | |
set-window-option -g window-status-activity-fg yellow | |
set-window-option -g window-status-bell-fg red | |
# vim: ft=tmux | |
# List of plugins | |
set -g @plugin 'tmux-plugins/tpm' | |
set -g @plugin 'tmux-plugins/tmux-sensible' | |
set -g @plugin 'tmux-plugins/tmux-pain-control' | |
set -g @plugin 'tmux-plugins/tmux-resurrect' | |
set -g @plugin 'tmux-plugins/tmux-continuum' | |
set -g @plugin 'tmux-plugins/tmux-yank' | |
set -g @plugin 'tmux-plugins/tmux-copycat' | |
# Initialize TMUX plugin manager (keep this line at the very bottom of tmux.conf) | |
run '~/.tmux/plugins/tpm/tpm' |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment