-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy path.tmux.conf
138 lines (102 loc) · 3.84 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
125
126
127
128
129
130
131
132
133
134
135
136
137
138
set-environment -g PATH "/opt/homebrew/bin:/usr/local/bin:/bin:/usr/bin"
#plugin list
set -g @plugin 'tmux-plugins/tmux-resurrect'
set -g @plugin 'tmux-plugins/tmux-open'
set -g @resurrect-capture-pane-contents 'on'
# remap C-b to C-a
unbind C-b
set-option -g prefix C-a
bind-key C-a send-prefix
unbind '"'
unbind %
bind \\ split-window -h
bind \" split-window -v
# vim mode
set-window-option -g mode-keys vi
# Open ~/.tmux.conf in vim and reload settings on quit
unbind e
bind e new-window -n '~/.tmux.conf' "sh -c 'nvim ~/.tmux.conf && tmux source ~/.tmux.conf'"
unbind Z
bind Z if -F '#{@layout_save}' \
{run 'tmux select-layout "#{@layout_save}" \; set -up @layout_save'} \
{set -Fp @layout_save "#{window_layout}" ; run 'tmux resizep -y "#{window_height}"'}
# Use r to quickly reload tmux settings
unbind r
bind r \
source-file ~/.tmux.conf \;\
display 'Reloaded tmux config'
# Move around panes with hjkl, as one would in vim after pressing ctrl + w
bind h select-pane -L
bind j select-pane -D
bind k select-pane -U
bind l select-pane -R
# improve performance
set -s escape-time 0
set -g focus-event 1
# Enable mouse control (clickable windows, panes, resizable panes)
set -g mouse on
# don't rename windows automatically
set-option -g allow-rename off
# custom
#############################
########## Settings
#############################
# Refresh status line every 5 seconds - Good for when music is playing / update time etc
set -g status-interval 5
set-option -g renumber-windows on
# Start window and pane indices at 1.
set -g base-index 1
set -g pane-base-index 0
# Length of tmux status line
set -g status-left-length 30
set -g status-right-length 150
set-option -g status "on"
# Default statusbar color
# set-option -g status-style bg=colour237,fg=colour223
set-option -g status-style bg=#101421
# Default window title colors
set-window-option -g window-status-style bg=colour62,fg=colour237 # bg=yellow, fg=bg1
# Default window with an activity alert
set-window-option -g window-status-activity-style bg=colour237,fg=colour248 # bg=bg1, fg=fg3
# Active window title colors
set-window-option -g window-status-current-style bg=red,fg=colour237 # fg=bg1
# Set active pane border color
set-option -g pane-active-border-style fg=colour62
# Set inactive pane border color
set-option -g pane-border-style fg=colour255
# Message info
set-option -g message-style bg=colour239,fg=colour255 # bg=bg2, fg=fg1
# Writing commands inactive
set-option -g message-command-style bg=colour57,fg=colour255 # bg=fg3, fg=bg1
# Pane number display
set-option -g display-panes-active-colour colour1 #fg2
set-option -g display-panes-colour colour237 #bg1
set -g status-right "cpu: #(~/.tmux/scripts/cpu_usage.sh) | mem: #(~/.tmux/scripts/mem_usage.sh) | #(~/.tmux/scripts/music.sh)"
# Clock
set-window-option -g clock-mode-colour colour109 #blue
# Bell
set-window-option -g window-status-bell-style bg=colour167,fg=colour235 # bg=red, fg=bg1
set-option -g status-position top
set-option -g status-left "\
#{?client_prefix,#[fg=colour167],}#{?window_zoomed_flag, 🔍,}"
# set-option -g status-right "\
# #[fg=colour239, bg=colour237] \
# #[fg=colour255, bg=colour239] #(cd #{pane_current_path}; git rev-parse --abbrev-ref HEAD) \
# #[fg=colour237, bg=colour239] \
# #[fg=colour239, bg=colour237] \
# #[fg=colour255, bg=colour239] #(~/.tmux/scripts/music.sh) \
# #[fg=colour237, bg=colour239] "
set-window-option -g window-status-current-format "\
#[fg=colour237, bg=colour57]\
#[fg=colour255, bg=colour57] #I* \
#[fg=colour255, bg=colour57, bold] #W \
#[fg=colour62, bg=colour237]"
set-window-option -g window-status-format "\
#[fg=colour237,bg=#191D2F,noitalics]\
#[fg=colour255,bg=#191D2F] #I \
#[fg=colour255, bg=#191D2F] #W \
#[fg=#191D2F, bg=colour237]"
# Set the history limit so we get lots of scrollback.
setw -g history-limit 50000000
#tmux plugin manager
run '~/.tmux/plugins/tpm/tpm'