Skip to content

Instantly share code, notes, and snippets.

@kwokhou
Created August 2, 2018 01:03
Show Gist options
  • Save kwokhou/3663c9806a2037623e27bb33a8362ec5 to your computer and use it in GitHub Desktop.
Save kwokhou/3663c9806a2037623e27bb33a8362ec5 to your computer and use it in GitHub Desktop.
Tmux config
# 0 is too far from ` ;)
set -g base-index 1
# Automatically set window title
set-window-option -g automatic-rename on
# Titles (window number, program name, active (or not)
set-option -g set-titles on
set-option -g set-titles-string '#H:#S.#I.#P #W #T'
#set -g default-terminal screen-256color
set -g status-keys vi
set -g history-limit 10000
set -sg escape-time 0
set -g mouse on
set -g default-terminal "screen-256color"
set -ga terminal-overrides ",tmux-256color:Tc"
set -g display-time 4000
set-option -ga terminal-overrides ",xterm-256color:Tc"
############################################################################
# windows
############################################################################
# Don't auto naming window using last command
set-option -g allow-rename off
# Background color
bind-key C-b last-window # C-b C-b for last active window
# open new windows in previous working directory
# bind c new-window -c "$PWD"
bind '%' split-window -h -c '#{pane_current_path}' # Split panes horizontal
bind '"' split-window -v -c '#{pane_current_path}' # Split panes vertically
bind c new-window -c '#{pane_current_path}' # Create new window
# set window list colors - red for active and cyan for inactive
set-window-option -g window-status-fg brightblue #base0
set-window-option -g window-status-bg colour236
set-window-option -g window-status-attr dim
set-window-option -g window-status-current-bg red
set-window-option -g window-status-current-fg brightred #orange
set-window-option -g window-status-current-bg colour236
set-window-option -g window-status-current-attr bright
# visual notification of activity in other windows
setw -g monitor-activity on
set -g visual-activity on
# 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
# reload ~/.tmux.conf using PREFIX r
bind r source-file ~/.tmux.conf \; display "Reloaded!"
######################
### DESIGN CHANGES ###
######################
# 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
# modes
setw -g clock-mode-colour colour5
setw -g mode-attr bold
setw -g mode-fg colour1
setw -g mode-bg colour18
# panes
set -g pane-border-bg colour0
set -g pane-border-fg colour19
set -g pane-active-border-bg colour0
set -g pane-active-border-fg colour9
# statusbar
set -g status-position bottom
set -g status-justify left
set -g status-bg colour18
set -g status-fg colour137
set -g status-attr dim
set -g status-left ''
set -g status-right '#[fg=colour233,bg=colour19,bold] %d/%m #[fg=colour233,bg=colour8,bold] %H:%M:%S '
set -g status-right-length 50
set -g status-left-length 20
setw -g window-status-current-fg colour1
setw -g window-status-current-bg colour19
setw -g window-status-current-attr bold
setw -g window-status-current-format ' #I#[fg=colour249]:#[fg=colour255]#W#[fg=colour249]#F '
setw -g window-status-fg colour9
setw -g window-status-bg colour18
setw -g window-status-attr none
setw -g window-status-format ' #I#[fg=colour237]:#[fg=colour250]#W#[fg=colour244]#F '
setw -g window-status-bell-attr bold
setw -g window-status-bell-fg colour255
setw -g window-status-bell-bg colour1
# messages
set -g message-attr bold
set -g message-fg colour232
set -g message-bg colour16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment