summaryrefslogtreecommitdiff
path: root/.tmux.conf
blob: 432b06672aed151667bbb9319e68094b95d3d6e7 (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
unbind C-b
set -g prefix C-a
bind C-a send-prefix

set -g mouse on

# set clipboard on
set-option -g set-clipboard external

# vim mode and copy keybindings
setw -g mode-keys vi # list keybindings: tmux list-keys -T copy-mode-vi
bind-key -T copy-mode-vi 'v' send -X begin-selection
bind-key -T copy-mode-vi 'y' send-keys -X copy-pipe-and-cancel 'xclip -in -selection clipboard'
bind-key -T copy-mode-vi 'r' send-keys -X rectangle-toggle
bind-key -T copy-mode-vi "Y" send-keys -X copy-pipe-and-cancel "tmux paste-buffer"
bind-key -T copy-mode-vi MouseDragEnd1Pane send -X copy-pipe-and-cancel "reattach-to-user-namespace pbcopy"
bind-key -T copy-mode-vi MouseDown3Pane select-pane  # right mouse button (to highlight sutff)
bind-key -T copy-mode-vi MouseDrag3Pane select-pane \; send-keys -X begin-selection
unbind-key -T copy-mode-vi MouseDragEnd3Pane

set -sg escape-time 1
set -g base-index 1
setw -g pane-base-index 1

set -s default-terminal tmux-256color
set -s terminal-overrides ''
set -as terminal-overrides ',*:Tc'
set-option -g xterm-keys on

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

set -g history-limit 10000

bind-key v split-window -h
bind-key s split-window -v

bind h select-pane -L
bind j select-pane -D
bind k select-pane -U
bind l select-pane -R

bind -r H resize-pane -L 5
bind -r J resize-pane -D 5
bind -r K resize-pane -U 5
bind -r L resize-pane -R 5

# styling
set -g status-style "fg=#b5b4c9 bg=#1c1c1c"

# source-file ~/.tmux/moonfly.tmux.conf