Skip to content

Instantly share code, notes, and snippets.

@yaodong
Created August 6, 2019 06:18
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save yaodong/14b6f6929d658fa948df63922aa6c160 to your computer and use it in GitHub Desktop.
Save yaodong/14b6f6929d658fa948df63922aa6c160 to your computer and use it in GitHub Desktop.
###########################
# Common Configuration
###########################
set -g default-terminal "screen-256color"
# use vim key bindings
setw -g mode-keys vi
# increase repeat time for repeatable commands
set -g repeat-time 1000
# start window index at 1
set -g base-index 1
# start pane index at 1
setw -g pane-base-index 1
# highlight window when it has new activity
setw -g monitor-activity on
set -g visual-activity on
# re-number windows when one is closed
set -g renumber-windows on
###########################
# Plugins
###########################
# Install tpm: https://github.com/tmux-plugins/tpm
# plugin manager
set -g @plugin 'tmux-plugins/tpm'
# session management
set -g @plugin 'tmux-plugins/tmux-sessionist'
# pana management
set -g @plugin 'tmux-plugins/tmux-pain-control'
# Plugin that highlights when you press tmux prefix key
set -g @plugin 'tmux-plugins/tmux-prefix-highlight'
# enables copying highlighted text to system clipboard
set -g @plugin 'tmux-plugins/tmux-yank'
# quickly opening highlighted file or a url
set -g @plugin 'tmux-plugins/tmux-open'
##########################
# Configuration Overrides
###########################
# tmux prefix
unbind C-b
set -g prefix C-j
# select pane
unbind ^J
bind ^J select-pane -t :.+
# windows
bind | split-window -h -c "#{pane_current_path}"
bind - split-window -c "#{pane_current_path}"
bind c new-window
bind C new-window -c "#{pane_current_path}"
bind , command-prompt -p (rename-window) "rename-window '%%'"
##########################
# Appearance
##########################
# Color key:
# #1d1f21 Background
# #282a2e Current Line
# #373b41 Selection
# #c5c8c6 Foreground
# #969896 Comment
# #cc6666 Red
# #de935f Orange
# #f0c674 Yellow
# #b5bd68 Green
# #8abeb7 Aqua
# #81a2be Blue
# #b294bb Purple
## set status bar
set -g status-style bg="#2d2d2d"
setw -g window-status-current-style bg="#282a2e",fg="#81a2be"
## highlight active window
#setw -g window-style 'bg=#282a2e'
#setw -g window-active-style 'bg=#1d1f21'
#setw -g pane-active-border-style ''
## highlight activity in status bar
setw -g window-status-activity-style fg="#8abeb7",bg="#1d1f21"
## pane border and colors
set -g pane-active-border-style bg=default,fg="#1d1f21"
set -g pane-border-style bg=default,fg="#2d2d2d"
set -g clock-mode-colour "#81a2be"
set -g message-style bg="#8abeb7",fg="#000000"
set -g message-command-style bg="#8abeb7",fg="#000000"
# message bar or "prompt"
set -g message-style bg="#2d2d2d",fg="#cc99cc"
set -g mode-style bg="#1d1f21",fg="#de935f"
# left side of status bar
set -g status-left-style fg=white
# right side of status bar holds "[host name] (date time)"
set -g status-right-length 100
set -g status-right-style fg="#999999"
set -g status-right '#{prefix_highlight} %H:%M | %y/%m/%d #[default]'
# make background window look like white tab
set-window-option -g window-status-style bg=colour235,fg=white
set-window-option -g window-status-format '#[fg=#6699cc] #I #[fg=#999999] #W #[default]'
# make foreground window look like bold yellow foreground tab
set-window-option -g window-status-current-style bg=colour235
set-window-option -g window-status-current-format '#[fg=#f99157] #I #[fg=#cccccc] #W #[default]'
# active terminal yellow border, non-active white
set -g pane-border-style bg=default,fg="#999999"
set -g pane-active-border-style fg="#f99157"
# Initialize TMUX plugin manager (keep this line at the very bottom of tmux.conf)
run '~/.tmux/plugins/tpm/tpm'
#EOF
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment