summaryrefslogtreecommitdiff
path: root/.config/tmux/tmux.conf
blob: 42a44b4b32810239fea4c2dfe8f147e291bfb0f7 (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 M-Space
bind M-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-h select-pane -L
bind -n M-l select-pane -R
bind -n M-k select-pane -U
bind -n M-j select-pane -D

# Ctrl-arrow to switch windows
bind -n C-h previous-window
bind -n C-l next-window

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

# Synchronize panes
set -s command-alias[100] 'sync=set-window-option synchronize-panes'