-
Notifications
You must be signed in to change notification settings - Fork 0
/
tmux.conf
85 lines (63 loc) · 1.91 KB
/
tmux.conf
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
unbind C-a
unbind C-b
set -g prefix C-a
# Initializes TMUX plugin manager.
run-shell '~/.tmux/plugins/tpm/tpm'
# Ring the bell if any background window rang a bell
set -g bell-action any
# Watch for activity in background windows
setw -g monitor-activity on
set-option -g set-titles on
set-option -g allow-rename on
set-option -g renumber-windows on
set-option -s set-clipboard off
# Keep your finger on ctrl, or don't
bind-key ^D detach-client
bind-key ^C new-window
unbind s
unbind v
bind-key s split-window
bind-key v split-window -h
unbind a
unbind j
bind-key C-a select-pane -t :.+
bind C-k send-keys C-l \; clear-history
bind-key h select-pane -L
bind-key j select-pane -D
bind-key k select-pane -U
bind-key l select-pane -R
bind-key b select-window -t :-
bind-key n select-window -t :+
bind-key g choose-session
bind-key w new-session
# Use vi keybindings in copy and choice modes
setw -g mode-keys vi
# Vim-style copy/paste
# bind [ copy-mode
unbind p
bind p paste-buffer
bind-key -Tcopy-mode-vi 'v' send -X begin-selection
bind-key -Tcopy-mode-vi 'y' send -X copy-selection
bind-key -Tcopy-mode-vi Escape send -X cancel
# https://bbs.archlinux.org/viewtopic.php?pid=1572476#p1572476
bind -n WheelUpPane select-pane -t= \; copy-mode -e \; send-keys -M
bind -n WheelDownPane select-pane -t= \; send-keys -M
bind -n C-WheelUpPane select-pane -t= \; copy-mode -e \; send-keys -M
set -sg escape-time 0
# set first window to index 1 (not 0) to map more to the keyboard layout...
set -g base-index 1
setw -g pane-base-index 1
# reload tmux config
unbind r
bind r \
source-file ~/.tmux.conf \;\
display 'Reloaded tmux config.'
set -g mouse off
# pass through xterm keys
set -g xterm-keys on
set -g default-terminal "screen-256color"
set -g @plugin 'tmux-plugins/tpm'
set -g @plugin 'tmux-plugins/tmux-sensible'
set -g @plugin 'tmux-plugins/tmux-yank'
run '~/.tmux/plugins/tpm/tpm'
source-file ~/.tmuxline.conf