-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathtmux.conf
More file actions
137 lines (108 loc) · 4.49 KB
/
Copy pathtmux.conf
File metadata and controls
137 lines (108 loc) · 4.49 KB
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
125
126
127
128
129
130
131
132
133
134
135
136
137
run-shell 'tmux setenv -g TMUX_VERSION $(tmux -V | sed -En "s/^tmux ([0-9]+(.[0-9]+)?).*/\1/p")'
gray_light="#D8DEE9"
gray_medium="#ABB2BF"
gray_dark="#3B4252"
green_soft="#A3BE8C"
blue_muted="#81A1C1"
cyan_soft="#88C0D0"
set -g status-position top
set -g status-left-length 100
set -g status-style "fg=${gray_light},bg=default"
set -g status-left "#[fg=${green_soft},bold]\[#S\] #[fg=${gray_light},nobold]"
#set -g status-right "#[fg=${green_soft},bold]%d %b %R #H"
set -g status-right "#[fg=${green_soft},bold]#H CPU:#(cpu_percentage) MEM:#(mem_percentage)"
set -g window-status-current-format "#[fg=${cyan_soft},bold] #[underscore]#I:#W"
set -g window-status-format " #I:#W"
set -g message-style "fg=${gray_light},bg=${gray_dark},bold"
set -g mode-style "fg=${gray_dark},bg=${blue_muted}"
set -g pane-border-style "fg=${gray_dark}"
set -g pane-active-border-style "fg=${gray_medium}"
set -g window-status-activity-style fg=orange,none
set -g update-environment "DISPLAY WINDOWID XAUTHORITY SSH_ASKPASS SSH_AGENT_PID SSH_CONNECTION TERM"
unbind C-b
set -g prefix C-a
set -sg escape-time 1
#bind C-b send-prefix
bind a send-prefix
# start window numbering at 1
set -g base-index 1
setw -g pane-base-index 1
# renumber windows when one is closed
set -g renumber-windows on
# easier bindings to split a window
bind v split-window -h -c "#{pane_current_path}"
bind h split-window -v -c "#{pane_current_path}"
bind c new-window -c "#{pane_current_path}"
bind H resize-pane -L 5
bind J resize-pane -D 5
bind K resize-pane -U 5
bind L resize-pane -R 5
# enable vi keys
setw -g mode-keys vi
if-shell '[ "$(echo "$TMUX_VERSION > 2.1" | bc)" = 1 ]' " \
bind -T copy-mode-vi v send-keys -X begin-selection; \
bind -T copy-mode-vi y send-keys -X copy-selection-and-cancel; \
bind -T copy-mode-vi C-v send-keys -X rectangle-toggle"
bind C-a last-window
# Sync panes (Send input to all panes in the window). When enabled, pane
# borders become red as an indication.
bind C-s if -F '#{pane_synchronized}' \
'setw synchronize-panes off; \
setw pane-active-border-style fg=${gray_medium}; \
setw pane-border-format " #P "' \
'setw synchronize-panes on; \
setw pane-active-border-style fg=red; \
setw pane-border-format " #P - Pane Synchronization ON "'
# save/restore buffer to clipboard
bind C-c run "tmux save-buffer - | xclip -i -sel clipboard"
bind C-v run "tmux set-buffer \"$(xclip -o -sel clipboard)\"; tmux paste-buffer"
# enable mouse
#set -g mouse on
# set 256 color terminal and also fix window name issue
set -g default-terminal "tmux-256color"
set -as terminal-features ',*256color:RGB'
# undercurl support
set -as terminal-overrides ',*:Smulx=\E[4::%p1%dm'
# support colors for undercurl
set -as terminal-overrides ',*:Setulc=\E[58::2::%p1%{65536}%/%d::%p1%{256}%/%{255}%&%d::%p1%{255}%&%d%;m'
bind C-k clear-history
# increase scrollback buffer
set -g history-limit 50000
# set the status line colors
# set -g status-fg white
# set -g status-bg black
# if-shell '[ "$(echo "$TMUX_VERSION < 2.1" | bc)" = 1 ]' " \
# setw -g window-status-fg cyan; \
# setw -g window-status-attr dim; \
# setw -g window-status-bg default; \
# setw -g window-status-current-fg white; \
# setw -g window-status-current-bg red; \
# setw -g window-status-current-attr bright; \
# set -g pane-border-fg green; \
# set -g pane-border-bg black; \
# set -g pane-active-border-fg yellow; \
# set -g pane-active-border-bg yellow" " \
# setw -g window-status-style fg=cyan,bg=red,dim; \
# setw -g window-status-current-style fg=white,bg=red,bright; \
# set -g pane-border-style fg=green,bg=black; \
# set -g pane-active-border-style fg=yellow,bg=yellow"
# status line left side
# set -g status-left-length 40
# set -g status-left "#[bg=green]#[fg=black]Session: #S #[fg=red]W:#I #[fg=red]P:#P "
# status line right side
# set -g status-right "#[bg=green]#[fg=black]%d %b %R #H"
# status bar refresh time
set -g status-interval 2
# center the window list
set -g status-justify centre
# enable activity alerts
setw -g monitor-activity on
setw -g visual-activity on
set -g focus-events on
set -g allow-passthrough on
# chose-window within current session
bind '"' run-shell 'tmux choose-tree -Zwf"##{==:##{session_name},#{session_name}}"'
# toggle a floating shell with a tmux session named _popup_
bind -n M-f if-shell "[ '#{session_name}' = '_popup_' ]" { detach } { display-popup -w80% -h 80% -E "tmux new -A -s _popup_" }
#run ~/git/tmux-gruvbox/gruvbox-tpm.tmux
#set -g @tmux-gruvbox 'dark256'