-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.tmux.conf
124 lines (109 loc) · 3.43 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
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
# tmux configuration based on: https://github.com/0xAX/my-dotfiles
#
# Keybindings
#
run-shell 'tmux setenv -g TMUX_VERSION $(tmux -V | cut -d" " -f2)'
set -g prefix C-x
bind C-x send-prefix
unbind C-x
unbind C-b
unbind C-a
unbind %
#unbind ,
unbind .
unbind n
unbind p
unbind [
unbind ]
unbind '"'
unbind l
unbind &
unbind "'"
unbind w
#
# vi
#
# vi status keys
set-window-option -g mode-keys vi
set-option -g status-keys vi
# copy & paste like vim
bind Escape copy-mode
bind p paste-buffer
bind-key -T copy-mode-vi v send-keys -X begin-selection
bind-key -T copy-mode-vi y send-keys -X copy-selection
bind-key -T copy-mode-vi r send-keys -X rectangle-toggle
#
# manage windows
#
bind-key n new-window
bind-key k kill-window
bind-key 2 split-window -h
bind-key 3 split-window
bind -n C-Right next-window
bind -n C-Left previous-window
#
# manage panes
#
bind-key x kill-pane
bind -n S-Up select-pane -U
bind -n S-Down select-pane -D
bind -n S-Left select-pane -L
bind -n S-Right select-pane -R
bind -n M-S-Up resize-pane -U
bind -n M-S-Down resize-pane -D
bind -n M-S-Left resize-pane -L
bind -n M-S-Right resize-pane -R
#
# window title
#
set-window-option -g automatic-rename on
set-option -g set-titles on
set-option -g set-titles-string '#S:#I.#P #W' # window number,program name,active (or not)
#
# misc
#
set -g history-limit 1500
set -g default-terminal "screen-256color"
set -g bell-action none
setw -g monitor-activity on
set -g base-index 1
setw -g pane-base-index 1
#
# ui: shamelessly taken from: https://github.com/magarcia/dotfiles
#
set -g status-bg "colour0"
if-shell -b '[ "$(echo "TMUX_VERSION < 2.9" | bc)" = 1]' \
"set -g message-command-fg colour15 \
set -g pane-active-border-fg colour10 \
set -g message-bg colour8 \
set -g status-right-attr none \
set -g message-fg colour15 \
set -g message-command-bg colour8 \
set -g status-attr none \
set -g status-left-attr none \
set -g pane-border-fg colour8 \
setw -g window-status-fg colour7 \
setw -g window-status-attr none \
setw -g window-status-activity-bg colour0 \
setw -g window-status-activity-attr none \
setw -g window-status-activity-fg colour10\
setw -g window-status-bg colour0"
if-shell -b '[ "$(echo "TMUX_VERSION >= 2.9" | bc)" = 1]' \
"set -g message-command-style fg=colour15,bg=colour8 \
set -g pane-active-border-style fg=colour10 \
set -g message-style bg=colour8,fg=colour15 \
set -g status-right-style none \
set -g status-left-style none \
set -g status-style none \
set -g pane-border-style fg=colour8 \
setw -g window-status-style fg=colour7,bg=colour0,none \
setw -g window-status-activity-style fg=colour10,bg=colour0,none"
set -g status-justify "left"
set -g status-left-length "100"
set -g status "on"
set -g status-right-length "100"
setw -g window-status-separator ""
set -g status-left "#[fg=colour234,bg=colour10] #S #[fg=colour10,bg=colour0,nobold,nounderscore,noitalics]▓▒░"
set -g status-right "#[fg=colour7,bg=colour0,nobold,nounderscore,noitalics]░▒▓#[fg=colour234,bg=colour7] %Y-%m-%d | %H:%M #[fg=colour7,bg=colour7,nobold,nounderscore,noitalics]░▒▓#[fg=colour234,bg=colour7] #h "
setw -g window-status-format "#[fg=colour7,bg=colour0] #I |#[fg=colour7,bg=colour0] #W "
setw -g window-status-current-format "#[fg=colour0,bg=colour8,nobold,nounderscore,noitalics]▓▒░#[fg=colour15,bg=colour8] #I |#[fg=colour15,bg=colour8] #W #[fg=colour8,bg=colour0,nobold,nounderscore,noitalics]▓▒░"