aboutsummaryrefslogtreecommitdiff
path: root/templates/.tmux.conf
blob: 09243b01199272bf6e7ffbe6684975305551093b (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
# vim: ft=tmux
# enable mouse
set -g mouse on

# don't delay escape key
set -sg escape-time 0

set-option -g mode-keys vi
# :#{pane_current_command}:#(pwd="#{pane_current_path}"; echo ${pwd####*/})#F'
#set-option -g window-status-format '#I:#{?window_name,#{window_name},#{pane_current_command}#(pwd="#{pane_current_path}"; echo ${pwd####*/})}#F'
#set-option -g window-status-current-format '#I:#{?window_name,#{window_name},#{pane_current_command}#(pwd="#{pane_current_path}"; echo ${pwd####*/})}#F'
#set-option -g window-status-current-format '#I:#{?window_name,#{window_name},#{pane_current_command}}#F'

#set-option -g status-right '%d%H%M%Z #(date -u +"%%d%%H%%M%%Z") #(cat $HOME/.cache/metar)'
#set-option -g status-right-length 100

set-option -g status-bg default
set-option -g status-fg green


# make | and - split windows
bind-key | split-window -h
bind-key - split-window -v
unbind-key '"'
unbind-key %

# easily reload tmux config
bind-key r source-file ~/.tmux.conf

# use vim-like keys for pane navigation
bind-key C-h select-pane -L
bind-key C-l select-pane -R
bind-key C-j select-pane -D
bind-key C-k select-pane -U

# use vim-like keys for pane resizing
bind-key h resize-pane -L 5
bind-key j resize-pane -D 5
bind-key k resize-pane -U 5
bind-key l resize-pane -R 5
bind-key H resize-pane -L 15
bind-key J resize-pane -D 15
bind-key K resize-pane -U 15
bind-key L resize-pane -R 15

{{ if eq .OS "darwin" }}
# copy/paste with pbcopy
bind-key -T copy-mode-vi MouseDragEnd1Pane send-keys -X copy-pipe-and-cancel "pbcopy"
bind-key -T copy-mode-vi Enter send-keys -X copy-pipe-and-cancel "pbcopy"
{{ end }}