Skip to content

Instantly share code, notes, and snippets.

@ambuc
Last active May 30, 2021
Embed
What would you like to do?
~/.tmux.conf
# :source-file ~/.tmux.conf
bind r source-file ~/.tmux.conf
# regular leader key
set -g prefix 'C-b'
bind-key 'C-b' send-prefix
set -g default-terminal "screen-256color"
set -sg escape-time 0 #Escape works without delay, important for Vim
#Star window and pane indexing at 1
set -g base-index 1
set -g pane-base-index 1
#top bar
set-option -g status-position top
set-window-option -g automatic-rename on
#longer names
set -g status-left-length 30
set -g status-right-length 60
set -g status-right "%H:%M :: %d %b %y"
#enable mouse for window/pane selection
set -g mouse on
setw -g mode-keys vi
setw -g monitor-activity on
#no repeat time
set -g repeat-time 0
# Vim keys for pane selection
bind h select-pane -L
bind j select-pane -D
bind k select-pane -U
bind l select-pane -R
# Use Alt-vim keys without prefix key to switch panes
bind -n M-h select-pane -L
bind -n M-j select-pane -D
bind -n M-k select-pane -U
bind -n M-l select-pane -R
bind -n M-z resize-pane -Z
# capital keys for pane resizing by 5
bind H resize-pane -L 5
bind J resize-pane -D 5
bind K resize-pane -U 5
bind L resize-pane -R 5
#open new windows and panes in same directory
bind c new-window -c "#{pane_current_path}"
bind _ split-window -v -c "#{pane_current_path}"
bind | split-window -h -c "#{pane_current_path}"
#automatic window renumbering
set-option -g renumber-windows on
#set tmux bar colors
set -g status-style "bg=black, fg=#808080"
set -g status-left-style "bg=black, fg=#808080"
set -g status-right-style "bg=black, fg=#808080"
set -g window-status-current-style "bg=black, fg=white"
set -g window-status-style "bg=black, fg=#585858"
set -g window-active-style "fg=white, bg=colour0"
set -g window-style "fg=white, bg=colour0"
set -g pane-border-style "fg=white, bg=black"
set -g pane-active-border-style "fg=red, bg=black"
set -g @plugin 'tmux-plugins/tmux-resurrect'
set -g @plugin 'tmux-plugins/tmux-continuum'
set -g @continuum-restore 'on'
set -g default-command /usr/bin/fish
set -g default-shell /usr/bin/fish
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment