Skip to content

Instantly share code, notes, and snippets.

@YingboMa
Created September 26, 2019 02:33
Show Gist options
  • Save YingboMa/7e0f89df60255cb9012e2fb48fca440f to your computer and use it in GitHub Desktop.
Save YingboMa/7e0f89df60255cb9012e2fb48fca440f to your computer and use it in GitHub Desktop.
set-option -g history-limit 65536
set -g -a terminal-overrides ',*:Ss=\E[%p1%d q:Se=\E[2 q'
set -g mouse on
#bind -n C-k clear-history
# default shell
set-option -g default-shell /usr/bin/fish
# clipboard settings
bind Enter copy-mode
setw -g mode-keys vi
set-window-option -g mode-keys vi
bind-key -T copy-mode-vi 'v' send -X begin-selection
unbind -T copy-mode-vi MouseDragEnd1Pane
bind-key -T copy-mode-vi y send -X copy-pipe "xsel -i --clipboard" \; send -X clear-selection
bind-key -T copy-mode-vi Y send-keys -X copy-pipe-and-cancel "xsel -i --clipboard"
unbind -T copy-mode MouseDragEnd1Pane
unbind -T copy-mode-vi MouseDragEnd1Pane
set-window-option -g pane-base-index 1
# Escape key conflict with vim
set-option -s escape-time 0
# remap prefix from 'C-b' to 'C-a'
unbind C-b
set-option -g prefix C-a
bind-key C-a send-prefix
# sync
bind-key C-s setw synchronise-panes
# split panes using | and -
bind | split-window -h -c "#{pane_current_path}"
bind - split-window -v -c "#{pane_current_path}"
unbind '"'
unbind %
# keload config file
bind r source-file ~/.tmux.conf
# switch panes using Alt-arrow without prefix
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
# switch windows using Ctrl-arrow without prefix
bind -n C-Left previous-window
bind -n C-Right next-window
# Enable mouse mode (tmux 2.1 and above)
#set -g mouse on
# don't rename windows automatically
set-option -g allow-rename off
######################
### DESIGN CHANGES ###
######################
# Emptyness is the best!
set -g status off
bind b set -g status
# panes
set -g pane-border-style fg=black
set -g pane-active-border-style fg=brightred
## Status bar design
# status line
set -g status-justify left
set -g status-interval 2
set -g status-style fg=colour12,bg=default
#window mode
setw -g mode-style bg=colour6,fg=colour0
# window status
setw -g window-status-format " #F#I:#W#F "
setw -g window-status-current-format " #F#I:#W#F "
setw -g window-status-format "#[fg=magenta]#[bg=black] #I #[bg=cyan]#[fg=colour8] #W "
setw -g window-status-current-format "#[bg=brightmagenta]#[fg=colour8] #I #[fg=colour8]#[bg=colour14] #W "
setw -g window-status-current-style fg=colour11,bg=colour0,dim
setw -g window-status-style fg=black,bg=green,reverse
# Info on left (I don't have a session display for now)
set -g status-left ''
# loud or quiet?
set-option -g visual-activity off
set-option -g visual-bell off
set-option -g visual-silence off
set-window-option -g monitor-activity off
set-option -g bell-action none
set -g default-terminal "screen-256color"
# The modes {
setw -g clock-mode-colour colour135
setw -g mode-style fg=colour196,bg=colour238,bold
# }
# The panes {
set -g pane-border-style fg=colour238,bg=colour235
set -g pane-active-border-style bg=colour236,fg=colour51
# }
# The statusbar {
set -g status-position bottom
set -g status-style bg=colour234,fg=colour137,dim
set -g status-left ''
set -g status-right '#[fg=colour233,bg=colour241,bold] %d/%m #[fg=colour233,bg=colour245,bold] %H:%M '
set -g status-right-length 50
set -g status-left-length 20
setw -g window-status-current-style fg=colour81,bg=colour238,bold
setw -g window-status-current-format ' #I#[fg=colour250]:#[fg=colour255]#W#[fg=colour50]#F '
setw -g window-status-style fg=colour138,bg=colour235,none
setw -g window-status-format ' #I#[fg=colour237]:#[fg=colour250]#W#[fg=colour244]#F '
setw -g window-status-bell-style fg=colour255,bg=colour1,bold
# }
# The messages {
set -g message-style bg=colour166,fg=colour232,bold
set -g message-command-style fg=blue,bg=black
# }
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment