-
Notifications
You must be signed in to change notification settings - Fork 2
/
dot_tmux.conf
120 lines (89 loc) · 2.91 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
120
# Prefix is Ctrl-A
unbind C-b
set -g prefix C-a
# improve colors
set -g default-terminal 'screen-256color'
set-option -g default-shell /bin/zsh
set-option -g mouse on
# resize windows on larger screens - if off the size is capped to the smallest
# screen size that has ever looked at it
setw -g aggressive-resize on
# Reload ~/.tmux.conf with Ctrl-r
bind-key r source-file ~/.tmux.conf
# Act like vim
setw -g mode-keys vi
##################
# Bindings
##################
bind h select-pane -L
bind j select-pane -D
bind k select-pane -U
bind l select-pane -R
##################
# Resizing #
##################
bind-key C-h resize-pane -L 10
bind-key C-j resize-pane -D 10
bind-key C-k resize-pane -U 10
bind-key C-l resize-pane -R 10
bind | split-window -h -c "#{pane_current_path}"
bind S split-window -v -c "#{pane_current_path}"
# Use current path when splitting
bind '"' split-window -c "#{pane_current_path}"
bind % split-window -h -c "#{pane_current_path}"
bind c new-window -c "#{pane_current_path}"
unbind p
bind-key p next-window
unbind n
bind-key n previous-window
# http://robots.thoughtbot.com/tmux-copy-paste-on-os-x-a-better-future
# Setup 'v' to begin selection as in Vim
bind-key -T copy-mode-vi 'v' send -X begin-selection
bind-key -T copy-mode-vi 'V' send -X select-line
bind-key -T copy-mode-vi 'r' send -X rectangle-toggle
bind-key -T copy-mode-vi 'y' send-keys -X copy-pipe-and-cancel 'reattach-to-user-namespace pbcopy'
# Update default binding of `Enter` to also use copy-pipe
unbind -T copy-mode-vi Enter
bind-key -T copy-mode-vi Enter send -X copy-pipe-and-cancel "reattach-to-user-namespace pbcopy"
unbind i
bind-key i setw synchronize-panes on
unbind O
bind-key O setw synchronize-panes off
# Be more responsive with commands
set -s escape-time 1
# start window numbers at 1 to match keyboard order with tmux window order
set -g base-index 1
set-window-option -g pane-base-index 1
# renumber windows sequentially after closing any of them
set -g renumber-windows on
# setw -g mode-mouse on
##################
# Status Bar
##################
# set refresh interval for status bar
set -g status-interval 5
# center the status bar
set -g status-justify left
# enable UTF-8 support in status bar
# set -g utf8 on
set -g status-keys vi
set -g status-justify 'left'
# Black with lighter text
set -g status-bg colour236
set -g status-fg white
# increase scrollback lines
set -g history-limit 5000
# switch to last pane
# bind-key C-a last-pane
# Local config
if-shell "[ -f ~/.tmux.conf.local ]" 'source ~/.tmux.conf.local'
set -g @plugin 'tmux-plugins/tpm'
set -g @plugin 'tmux-plugins/tmux-battery'
set -g @plugin 'tmux-plugins/tmux-sidebar'
set -g @plugin 'dracula/tmux'
set -g @plugin 'nhdaly/tmux-better-mouse-mode'
set -g @dracula-plugins "network battery cpu-usage ram-usage time"
set -g @dracula-show-powerline true
set -g @dracula-show-timezone false
set -g @dracula-refresh-rate 2
run '~/.tmux/plugins/tpm/tpm'