Skip to content

Instantly share code, notes, and snippets.

@liorrozen
Last active June 27, 2016 22:51
Show Gist options
  • Save liorrozen/8cbd0ea59735ffca4f60 to your computer and use it in GitHub Desktop.
Save liorrozen/8cbd0ea59735ffca4f60 to your computer and use it in GitHub Desktop.
My tmux.conf
# Reset Prefix
set -g prefix C-a
# Escape time
set -s escape-time 0
# large history
set-option -g history-limit 10000
# don't rename window
set-option -g allow-rename off
## use mouse
set-option -g mouse on
## Leave messages on screen for 4 seconds
set-option -g display-time 4000
# Toggle mouse on with ^B m
bind m \
set-option -g mouse \;\
display "#(tmux show-options -g mouse)"
# Start copy mode when scrolling up
# bind -n WheelUpPane select-pane -t= \; copy-mode -e \; send-keys -M
# bind -n WheelDownPane select-pane -t= \; send-keys -M
# copy mode colors
setw -g mode-bg yellow
setw -g mode-fg black
# colors
set-option -g default-terminal "screen-256color" #"xterm-256color" # "screen-256color"
# basic settings
set-window-option -g xterm-keys on # for vim
set-window-option -g mode-keys vi # vi key
set-window-option -g monitor-activity on
set -g visual-activity on
# setw -g window-status-current-attr reverse
# start window numbering at 1
set -g base-index 1
# don't jump to bottom after selection
unbind -t vi-copy MouseDragEnd1Pane
# vi movement keys
set-option -g status-keys vi
# Unbindings
unbind C-b # unbind default leader key
# Bindings
# reload tmux conf
bind-key r source-file ~/.tmux.conf
bind-key X confirm-before -p "kill-session? (y/n)" kill-session
# new split in current pane (horizontal / vertical)
bind-key - split-window -v # split pane horizontally
bind-key \ split-window -h # split pane vertically
# windows
set-window-option -g window-status-current-bg red
# By default, all windows in a session are constrained to the size of the
# smallest client connected to that session,
# even if both clients are looking at different windows.
# It seems that in this particular case, Screen has the better default
# where a window is only constrained in size if a smaller client
# is actively looking at it.
setw -g aggressive-resize on
# panes Navigatio
# use the vim motion keys to move between panes
bind-key h select-pane -L
bind-key j select-pane -D
bind-key k select-pane -U
bind-key l select-pane -R
# Toggle last window
bind-key l last-window
bind-key a copy-mode
# status bar config
set -g status-bg 'colour235'
set -g message-command-fg 'colour252'
set -g status-justify 'centre'
set -g status-left-length '100'
set -g status 'on'
set -g pane-active-border-fg 'colour252'
set -g message-bg 'colour238'
set -g status-right-length '100'
set -g status-right-attr 'none'
set -g message-fg 'colour252'
set -g message-command-bg 'colour238'
set -g status-attr 'none'
set -g pane-border-fg 'colour238'
set -g status-left-attr 'none'
setw -g window-status-attr 'none'
setw -g window-status-activity-bg 'colour235'
setw -g window-status-activity-attr 'none'
setw -g window-status-activity-fg 'colour252'
setw -g window-status-bg 'colour235'
set -g status-left '#[fg=colour232,bg=colour192] #S #[fg=colour192,bg=colour235,nobold,nounderscore,noitalics]▶ '
set -g status-right '#[fg=colour238,bg=colour235,nobold,nounderscore,noitalics]◀#[fg=colour192,bg=colour238] %Y-%m-%d %H:%M #[fg=colour192,bg=colour238,nobold,nounderscore,noitalics]◀#[fg=colour232,bg=colour192] #h #{?client_prefix,#[reverse]BIND KEY#[noreverse] ,}'
setw -g window-status-format '#[fg=colour243,bg=colour235] (#I) #[fg=colour243,bg=colour235] #W '
setw -g window-status-current-format '#[fg=colour192,bg=colour238] (#I) #W '
#------------------------#
# Tmux plugin manager #
#------------------------#
# List of plugins
set -g @plugin 'tmux-plugins/tpm'
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