Skip to content

Instantly share code, notes, and snippets.

@VTimofeenko
Created January 10, 2022 19:09
Show Gist options
  • Save VTimofeenko/69fe68bae239bb8cc9f26d07ac7e1d95 to your computer and use it in GitHub Desktop.
Save VTimofeenko/69fe68bae239bb8cc9f26d07ac7e1d95 to your computer and use it in GitHub Desktop.
set -g default-terminal "tmux-256color"
set -sg escape-time 0
# ctrl-b to switch between windows
bind-key C-b last-window
# nested tmux sessions
bind-key a send-prefix
setw -g aggressive-resize on
# Start numbering at 1
set -g base-index 1
bind-key -n C-n new-window -c "#{pane_current_path}"
bind-key -n M-. select-window -n
bind-key -n M-, select-window -p
bind-key -n M-< swap-window -t -1
bind-key -n M-> swap-window -t +1
bind-key -n M-X confirm-before "kill-window"
bind-key -n M-1 split-window -h -c "#{pane_current_path}"
bind-key -n M-= split-window -v -c "#{pane_current_path}"
bind-key -n M-R command-prompt -I "" "rename-window '%%'"
bind-key -n C-f resize-pane -Z
bind-key -n M-Up select-pane -U
bind-key -n M-Down select-pane -D
bind-key -n C-x confirm-before "kill-pane"
bind-key -n M-/ copy-mode
bind-key k select-pane -U
bind-key j select-pane -D
unbind l
bind-key l select-pane -R
bind-key h select-pane -L
# colors
set -g status-bg yellow
set -g status-fg black
# vim mode colors
setw -g mode-keys vi
unbind r
bind r source-file ${HOME}/.config/tmux/tmux.conf
# splits
unbind '"'
unbind %
set -g pane-border-status top
set -g pane-border-format '#(ps --no-headers -t #{pane_tty} -o args -O-c)'
# vim keys
bind-key -T copy-mode-vi 'v' send -X begin-selection
bind-key -T copy-mode-vi 'y' send -X copy-selection-and-cancel
# look and feel
# panes
set -g pane-border-style 'fg=colour237 bg=colour0'
set -g pane-active-border-style 'bg=colour0 fg=colour214'
setw -g window-status-current-style 'fg=colour1 bg=colour233 bold'
setw -g window-status-current-format ' #I#[fg=colour249]:#[fg=colour255]#W#[fg=colour249]#F '
setw -g window-status-style 'fg=colour9 bg=colour59'
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'
# messages
set -g message-style 'fg=colour232 bg=colour214 bold'
set -g status-left-length 30
set -g status-right-length 150
set-option -g history-limit 5000
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment