summaryrefslogtreecommitdiff
path: root/.config/tmux/tmux.conf
blob: fae79a383cced6ead8ca666e8446358bb2667bde (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
# -g for global
# -n to not require prefix key

# Source bashrc
set-option -g default-command $SHELL

# Set base index to 1
set -g base-index 1
set-window-option -g pane-base-index 1

# Prefix-r to reload configuration
bind r source-file ~/.config/tmux/tmux.conf \; display-message "Config reloaded"

# Enable mouse controls
set -g mouse on

# Prefix key to Ctrl-Space
unbind C-b
set-option -g prefix C-Space
bind C-Space send-prefix

# Prefix-v/h to create panes
bind v split-window -h
bind h split-window -v

# Alt-arrow 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

# Ctrl-arrow to switch windows
bind -n C-Left previous-window
bind -n C-Right next-window

# Ctrl-Shift-arrow to change window order
bind -n C-S-Left swap-window -t -1 \; previous-window
bind -n C-S-Right swap-window -t +1 \; next-window

# Synchronize panes
bind-key s set-window-option synchronize-panes\; display-message "Synchronize mode on"