/
.tmux.conf
97 lines (77 loc) · 2.77 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
86
87
88
89
90
91
92
93
94
95
96
# Prefix key
set -g prefix C-f
# Vi mode
set -g status-keys vi
setw -g mode-keys vi
# Relax
set -sg escape-time 0
set -sg repeat-time 600
# Mouse mode
set -g mode-mouse on
set -g mouse-select-window on
set -g mouse-select-pane on
set -g mouse-resize-pane on
# Custom status bar
# Powerline symbols: ⮂ ⮃ ⮀ ⮁ ⭤
set -g status-utf8 on
set -g status-bg colour234
set -g status-fg white
set -g status-left-length 32
set -g status-right-length 150
set -g status-interval 20
set -g status-left '#[fg=colour22,bg=colour148,bold] ❐ #S #[fg=colour15,bg=colour238,bold] #[fg=colour238,bg=colour234,nobold]'
set -g status-right '#[fg=colour245] #(whoami) #[fg=colour15,bg=colour238] #H #[fg=colour234,bg=colour252,nobold] %R #[fg=colour246]%d %b '
setw -g window-status-format '#[fg=white,bg=colour234]#I:#W'
setw -g window-status-current-format '#[fg=colour208,bg=colour234]#I:#W'
setw -g window-status-activity-bg black
setw -g window-status-activity-fg green
setw -g window-status-activity-attr bold
set -g pane-border-fg colour239
set -g pane-border-bg black
set -g pane-active-border-fg colour214
set -g pane-active-border-bg black
# Window options
set -g visual-activity on
set -g visual-content on
setw -g monitor-activity on
setw -g automatic-rename off
set -g set-titles on
set -g set-titles-string '[#I] #W'
set -g base-index 1
setw -g pane-base-index 1
set -g default-terminal "screen-256color"
# Activity
# setw -g monitor-activity on
# set -g visual-activity off
# Key bindings
# -r means key is repeatable
# -t specifies key table for binding
unbind C-b
unbind C-s
unbind %
unbind '"'
unbind [
unbind p
bind C-f last-window
bind v split-window -h
bind s split-window -v
bind S choose-session
bind r source-file ~/.tmux.conf \; display " ✱ ~/.tmux.conf is reloaded"
bind h select-pane -L
bind j select-pane -D
bind k select-pane -U
bind l select-pane -R
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 C new-window \; command-prompt -p 'Rename window:' 'rename-window %1'
bind c new-window
bind , command-prompt -p 'Rename window:' 'rename-window %1'
bind \; command-prompt
bind v copy-mode
bind p paste-buffer
bind -t vi-copy y copy-selection
bind -t vi-copy Escape cancel
# Fix tmux detaching from clipboard
# set -g default-command "hash reattach-to-user-namespace && reattach-to-user-namespace -l zsh"