-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathtmux.conf
73 lines (58 loc) · 2.27 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
run-shell 'tmux setenv -g TMUX_VERSION $(tmux -V | \
sed -En "s/^tmux[^0-9]*([.0-9]+).*/\1/p")'
# Also enable C-f to see if I like it.
set -g prefix C-f
bind C-f send-prefix
# Reload configuration.
bind r source-file ~/.tmux.conf
# Move between panes using vi keys.
set-window-option -g mode-keys vi
bind h select-pane -L
bind j select-pane -D
bind k select-pane -U
bind l select-pane -R
# Global control j/k for fast next/previous pane switching.
bind-key -n C-j select-pane -t :.+
bind-key -n C-k select-pane -t :.-
# Unbind C-j and C-k from copy mode so they can still be used for changing
# panes without exiting copy mode.
unbind-key -Tcopy-mode-vi C-j
unbind-key -Tcopy-mode C-k
# Resize panes using vi keys.
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
bind -r P resize-pane -R 25
bind 8 resize-pane -x 80
if-shell -b '[ "$(echo "$TMUX_VERSION < 2.1" | bc)" = 1 ]' " \
bind-key -t vi-copy 'v' begin-selection; \
bind-key -t vi-copy 'y' copy-selection; \
bind-key -t vi-copy 'r' rectangle-toggle"
if-shell -b '[ "$(echo "$TMUX_VERSION >= 2.1" | bc)" = 1 ]' " \
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 'r' send -X rectangle-toggle"
# Use 'v' and 's' for creating vertical and horizontal splits. Capital versions
# split across the full length of that dimension.
# Remove default bindings since we’re replacing.
unbind %
unbind '"'
bind v split-window -h -c '#{pane_current_path}'
bind V split-window -hf -c '#{pane_current_path}'
bind s split-window -v -c '#{pane_current_path}'
bind S split-window -vf -c '#{pane_current_path}'
bind c new-window -c '#{pane_current_path}'
# Mirror input across all panes in the current window.
bind m set-window-option synchronize-panes
set -g default-terminal "screen-256color"
set-option -g terminal-overrides ",xterm-256color:RGB"
# Increase scrollback.
set-option -g history-limit 100000
# Status Bar
set -g status-interval 5
set -g @onedark_date_format "%m-%d-%y"
set -g @onedark_time_format "%R:%S"
set -g @onedark_widgets_right "#(id -u -n)@#H"
set -g @onedark_widgets_right2 "#(uptime | awk '{print $10, $11, $12}')"
run-shell ~/dotfiles/tmux-onedark-theme.tmux