Skip to content

Instantly share code, notes, and snippets.

@tot0rokr
Forked from junho85/.tmux.conf
Last active December 22, 2022 06:58
Show Gist options
  • Save tot0rokr/f1bfaaaa88716fd5e491f17f3038998f to your computer and use it in GitHub Desktop.
Save tot0rokr/f1bfaaaa88716fd5e491f17f3038998f to your computer and use it in GitHub Desktop.
tmux.conf for v2.6
# set -g mouse on
# mouse scroll
set -g terminal-overrides 'xterm*:smcup@:rmcup@'
# 256 color
set -g default-terminal "screen-256color"
setw -g mode-keys vi
# Change prefix bind-key
unbind C-b
set -g prefix C-a
bind-key C-a send-prefix
bind | split-window -h
bind C-s set-option -g status
# Use Alt-arrow keys without prefix key to switch panes
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
bind h select-pane -L
bind l select-pane -R
bind k select-pane -U
bind j select-pane -D
# Shift arrow to switch windows
bind -n S-Left previous-window
bind -n S-Right next-window
bind -r H previous-window
bind -r L next-window
# ZOOM
bind -n M-z resize-pane -Z
# scrollback buffer size increase
set -g history-limit 100000
# change window order
# bind-key -n C-S-Left swap-pane -D
# bind-key -n C-S-Right swap-pane -D
bind-key -n C-S-Left swap-pane -s {left-of}
bind-key -n C-S-Right swap-pane -s {right-of}
bind-key -n C-S-Up swap-pane -s {up-of}
bind-key -n C-S-Down swap-pane -s {down-of}
bind-key -n C-S-Left swap-window -t -1\; select-window -t -1
bind-key -n C-S-Right swap-window -t +1\; select-window -t +1
# disable window name auto change
set-option -g allow-rename off
# key binding for ALT+num
# switch windows alt+number
bind-key -n M-0 select-window -t 0
bind-key -n M-1 select-window -t 1
bind-key -n M-2 select-window -t 2
bind-key -n M-3 select-window -t 3
bind-key -n M-4 select-window -t 4
bind-key -n M-5 select-window -t 5
bind-key -n M-6 select-window -t 6
bind-key -n M-7 select-window -t 7
bind-key -n M-8 select-window -t 8
bind-key -n M-9 select-window -t 9
bind-key -n M-q display-panes
# pane number display
set-option -g display-panes-active-colour colour1 #blue
set-option -g display-panes-colour colour3 #orange
# set-option -g display-panes-active-colour colour33 #blue
# set-option -g display-panes-colour colour166 #orange
# pane border
set-option -g pane-border-style fg=colour8
set-option -g pane-active-border-style fg=colour2
set-option -g window-status-current-style fg=colour1
set-option -g window-status-style fg=colour3
# bar color
set-option -g status-fg colour252
set-option -g status-bg colour240
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment