blob: 3b78628a38547756bbbbf014786e0bea36111873 (
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
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
|
### --- Settings --- ###
# general
set -as terminal-features 'xterm*:extkeys'
set -g base-index 1
set -g pane-base-index 1
set -g default-shell /bin/bash
set -g detach-on-destroy off
set -s extended-keys on
set -g focus-events on
set -g history-limit 1000000
set -g mouse on
set -g renumber-windows on
set -g set-clipboard on
set -g xterm-keys on
set -gq allow-passthrough on
set -ga update-environment TERM
set -ga update-environment TERM_PROGRAM
set -sg escape-time 0
setw -g mode-keys vi
setw -g aggressive-resize on
# activity
set -g monitor-activity on
set -g visual-activity off
# color
set -g default-terminal "xterm-256color"
set -ga terminal-overrides ',xterm-256color:Tc'
set -sa terminal-features ',xterm-256color:RGB'
# status
set -g status-interval 1
set -g status-justify absolute-centre
set -g status-left ""
set -g status-left-length 10
set -g status-position top
set -g status-right ""
set -g status-style "bg=default"
### --- Key Bindings --- ###
# clear
bind 'l' "send-keys C-l; send-keys -R; clear-history"
# copy-mode
bind 'v' copy-mode
# pane
bind '%' split-window -h -c '#{pane_current_path}'
bind '"' split-window -v -c '#{pane_current_path}'
bind '|' split-window -h
bind '-' split-window -v
bind -r 'C-down' resize-pane -D 5
bind -r 'C-up' resize-pane -U 5
bind -r 'C-left' resize-pane -L 5
bind -r 'C-right' resize-pane -R 5
bind '@' choose-window 'join-pane -h -s "%%"'
bind '#' choose-window 'join-pane -s "%%"'
bind 'x' kill-pane
bind 'a' kill-pane -a
bind 'X' kill-window
bind 'A' kill-window -a
bind -n 'M-k' move-pane -h -t '.{up-of}'
bind -n 'M-l' move-pane -t '.{right-of}'
bind -n 'M-h' move-pane -t '.{left-of}'
bind -n 'M-j' move-pane -h -t '.{down-of}'
# prefix
unbind 'C-b'
set -g prefix 'C-Space'
bind 'C-Space' send-prefix
# reload
unbind 'r'
bind 'r' source-file "~/.config/tmux/tmux.conf"
# session
bind -r '(' switch-client -p \; refresh-client -S
bind -r ')' switch-client -n \; refresh-client -S
bind -nr 'M-<' switch-client -p \; refresh-client -S
bind -nr 'M->' switch-client -n \; refresh-client -S
bind "'" switch-client -t'{marked}'
bind -r 'BSpace' switch-client -l
# window
bind -r '<' swap-window -d -t -1
bind -r '>' swap-window -d -t +1
bind -nr 'M-,' previous-window \; refresh-client -S
bind -nr 'M-.' next-window \; refresh-client -S
bind 'c' new-window -c "#{pane_current_path}"
bind -nr 'M-BSpace' last-window
|