-
Notifications
You must be signed in to change notification settings - Fork 0
/
dot_tmux.conf
119 lines (85 loc) · 3.13 KB
/
dot_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
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
# == General configuration == {{{1
# Use screen key combination
set -g prefix C-a
# Make pane numbering consistent
set -g base-index 1
set -g pane-base-index 1
# Ring the bell if any background window rang a bell
set -g bell-action any
# Renumber windows after closing
set -g renumber-windows on
# Bigger history
set -g history-limit 10000
# Resize window to smallest *active* session
setw -g aggressive-resize on
# Mouse scrolling and selection
setw -g mouse on
bind-key -T root WheelUpPane if-shell -F -t = "#{alternate_on}" "send-keys -M" "select-pane -t =; copy-mode -e; send-keys -M"
bind-key -T root WheelDownPane if-shell -F -t = "#{alternate_on}" "send-keys -M" "select-pane -t =; send-keys -M"
bind-key -T copy-mode-vi WheelUpPane send-keys -X halfpage-up
bind-key -T copy-mode-vi WheelDownPane send-keys -X halfpage-down
# Prevent tmux from waiting for escape sequence after prefix
set -sg escape-time 0
# Use vi keybindings for tmux commandline input
set -g status-keys vi
# Use vi keybindings in copy and choice modes
setw -g mode-keys vi
# == Key bindings == {{{1
# Send C-a to underlying applications
bind-key a send-prefix
# Allow detaching tmux with pressing Ctrl
bind-key ^D detach-client
# Move between panes using vi keys
bind-key -r j select-pane -D
bind-key -r k select-pane -U
bind-key -r h select-pane -L
bind-key -r l select-pane -R
# Go to "other" pane
bind-key -r o select-pane -t :.+
# Pane resize in all four directions using vi keys
bind-key -r J resize-pane -D 5
bind-key -r K resize-pane -U 5
bind-key -r H resize-pane -L 5
bind-key -r L resize-pane -R 5
# Screen like binding for last window
bind-key C-a last-window
# Rotate window
bind-key -r C-o rotate-window
# Create splits and vertical splits
bind-key v split-window -h -c "#{pane_current_path}"
bind-key ^V split-window -h -c "#{pane_current_path}"
bind-key s split-window -c "#{pane_current_path}"
bind-key ^S split-window -c "#{pane_current_path}"
# Create new window
bind-key c new-window -c "#{pane_current_path}"
# Toggle pane synchronization (mnemonic: e is for echo)
bind-key e setw synchronize-panes on
bind-key E setw synchronize-panes off
# Zoom
bind-key z resize-pane -Z
# Quickly reload configuration
bind-key r source-file ~/.tmux.conf \; display "Reloaded tmux configuration."
# == Copy-paste bindings == {{{1
# Simulate "visual" and "yank" key bindings
bind-key -T copy-mode-vi 'v' send-keys -X begin-selection
bind-key -T copy-mode-vi 'y' send-keys -X copy-selection
# == Appearance == {{{1
# Set TERM to colors friendly version
set -g default-terminal "screen-256color"
# Rename window to reflect current program; but don't allow others to do that
setw -g automatic-rename on
setw -g allow-rename off
# == Theme == {{{1
if-shell "test -f ~/.tmuxline-theme.conf" "source ~/.tmuxline-theme.conf"
# == Plugins == {{{1
set -g @plugin 'tmux-plugins/tpm'
set -g @plugin 'tmux-plugins/tmux-sessionist'
set -g @plugin 'dracula/tmux'
set -g @dracula-plugins "time cpu-usage ram-usage"
set -g @dracula-show-left-icon session
set -g @dracula-show-flags true
set -g @dracula-military-time true
run "~/.tmux/plugins/tpm/tpm"
# == Modeline == {{{1
# vim: ft=conf:fdm=marker:fen
#