-
Notifications
You must be signed in to change notification settings - Fork 0
/
.tmux.conf
85 lines (68 loc) · 2.49 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
set -g default-terminal "screen-256color"
# prefix
set -g prefix C-b
# mouse
set -g mouse on
# terminal title
set -g set-titles on
set -g set-titles-string '#T'
setw -g automatic-rename on
# border style
set -g pane-border-style fg=colour240,bg=colour0
set -g pane-active-border-style fg=colour26,bg=colour26
# status line
set -g status-position top
set -g status-interval 1
set -g status-bg colour234
set -g status-fg colour255
set -g status-left ""
set -g status-right " #(uptime | awk -F': ' '{print $2}' | sed -e 's/,//g') #[fg=colour255,bg=colour236] #S #[fg=colour255,bg=colour238] #h #[fg=colour255,bg=colour241] %m/%d(%a) %H:%M #[default]"
set -g status-right-length 80
set -g status-justify left
setw -g window-status-format "#[fg=colour255,bg=colour242] #I #[fg=colour255,bg=colour240] #W #[default]"
setw -g window-status-current-format "#[fg=colour255,bg=colour27] #I #[fg=colour255,bg=colour240] #W #[default]"
# pane status
set -g pane-border-status top
set -g pane-border-format " #{?pane_active,#[fg=colour255#,bg=colour27],#[fg=colour255#,bg=colour242]} #P #[fg=colour255,bg=colour240] #T #[fg=colour255,bg=colour237] #{pane_width}x#{pane_height}#{?window_zoomed_flag, (+),} #[default]"
# key bind
bind -n M-h select-pane -L
bind -n M-j select-pane -D
bind -n M-k select-pane -U
bind -n M-l select-pane -R
bind -n M-H resize-pane -L
bind -n M-J resize-pane -D
bind -n M-K resize-pane -U
bind -n M-L resize-pane -R
bind -n M-m resize-pane -Z
bind -n M-| split-window -h
bind -n M-- split-window -v
bind -n M-1 select-layout even-horizontal
bind -n M-2 select-layout even-vertical
bind -n M-3 select-layout main-horizontal
bind -n M-4 select-layout main-vertical
bind -n M-5 select-layout tiled
bind -n M-[ swap-pane -U
bind -n M-] swap-pane -D
bind -n M-n next-window
bind -n M-p previous-window
bind -n M-N switch-client -n
bind -n M-P switch-client -p
bind -n M-c new-window
bind -n M-d detach
bind -n M-q confirm -p 'kill-pane #P? (y/n)' kill-pane
bind -n M-Q confirm -p 'kill-window #W? (y/n)' kill-window
bind -n M-r command-prompt -I "#W" -p "(rename-window)" "rename-window -- '%%'"
bind -n M-R command-prompt -I "#S" -p "(rename-session)" "rename-session -- '%%'"
bind -n M-w choose-tree -w
bind -n M-s copy-mode
bind -n M-v paste-buffer
setw -g mode-keys vi
# disable suspend-client by prefix C-z
unbind C-z
# misc
set -s escape-time 10
set -g base-index 1
setw -g pane-base-index 1
set -g renumber-windows on
# Source .zshrc.local if present
if '[ -e "$HOME/.tmux.conf.local" ]' 'source $HOME/.tmux.conf.local'