Skip to content

Instantly share code, notes, and snippets.

@tobychung
Created September 21, 2016 10:30
Show Gist options
  • Save tobychung/7ca6b0b6150a90662110e04aba4f2d84 to your computer and use it in GitHub Desktop.
Save tobychung/7ca6b0b6150a90662110e04aba4f2d84 to your computer and use it in GitHub Desktop.
# Source: https://github.com/Casecommons/casecommons_workstation/blob/master/templates/default/dot_tmux.conf.erb
# https://github.com/Casecommons/vim-config/blob/master/init/tmux.vim
set-option -g terminal-overrides 'xterm:colors=256,*88col*:colors=88,*256col*:colors=256,xterm*:XT:Ms=\E]52;%p1%s;%p2%s\007:Cs=\E]12;%p1%s\007:Cr=\E]112\007:Ss=\E]50;CursorShape=%?%p1%{3}%<%t%{0}%e%p1%{2}%-%;%d\007'
unbind S
unbind R
unbind %
bind | split-window -h
bind – split-window -v
bind -r S-Right resize-pane -R
bind -r S-left resize-pane -L
bind < resize-pane -L 4
bind > resize-pane -R 4
bind - resize-pane -D 4
bind + resize-pane -U 4
bind -n C-k clear-history
#unbind S-,
#unbind S-.
#unbind S-Up
#unbind S-nd %
#### statusbar ####
set -g status-interval 1
set -g status-justify centre # center align window list
set -g status-left '#[fg=green] #H #[default]'
set -g status-right '#[fg=blue,bright]Up#(uptime | cut -f 4-5 -d " " | cut -f 1 -d ",") #[default]:: #[fg=cyan]#(cut -d " " -f 1-4 /proc/loadavg) '
#setw -g moniter-activity on
set -g visual-activity on
set-window-option -g window-status-current-bg yellow
# set the left side of the status bar to show the current active
# session, window and pane
set -g status-left "#[fg=colour234, bg=colour148] #S:#I.#P #[fg=colour0, bg=colour33] #H "
# set the right side of the status bar to show the current date and time
set -g status-right "#[fg=colour136, bg=color235] %a %d-%m-%Y | %H:%M "
# set the terminal to use 256 colors
set -g default-terminal "screen-256color"
# set what the current active window status bar should look like
set-window-option -g window-status-current-format "#[fg=colour255, bg=colour27] #I : #W "
# set what the standard status format should be
set-window-option -g window-status-format " #I : #W "
## Set the text (fg) and background
set -g status-fg colour136
set -g status-bg colour235
# set the window status colors and attribute
setw -g window-status-fg default
setw -g window-status-bg default
setw -g window-status-attr dim
# set the pane borders and colors
set -g pane-border-fg colour136
set -g pane-border-bg colour235
set -g pane-active-border-fg colour235
set -g pane-active-border-bg colour136
# set the alert and tmux command line colors
set -g message-fg colour136
set -g message-bg colour235
set -g message-attr bright
# Tmux Plugin Manager-------------------------
# List of plugins
# Supports `github_username/repo` or full git URLs
set -g @plugin 'tmux-plugins/tmux-resurrect'
set -g @tpm_plugins " \
tmux-plugins/tpm \
tmux-plugins/tmux-sensible \
tmux-plugins/tmux-resurrect \
"
# Other examples:
# github_username/plugin_name \
# git@github.com/user/plugin \
# git@bitbucket.com/user/plugin \
# Initializes TMUX plugin manager.
# Keep this line at the very bottom of tmux.conf.
run-shell ~/.tmux/plugins/tpm/tpm
#Tmux Resurrect
set -g @resurrect-save 'S'
set -g @resurrect-restore 'R'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment