-
Notifications
You must be signed in to change notification settings - Fork 0
/
dot_tmux.conf
145 lines (113 loc) · 4.34 KB
/
dot_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
139
140
141
142
143
144
145
####### ####### # # # #
# # # # # # # #
# # # # # # # #
# # # ### # #
# fix colors
# set -g default-terminal "tmux-256color"
# set -ga terminal-overrides ",*256col*:Tc"
# set -g default-terminal 'screen-256color'
set -g default-terminal 'alacritty'
set -ga terminal-overrides ",alacritty:Tc"
# set -ga terminal-overrides ",xterm-256color:Tc"
# BINDINGS
# bind tmux leader key
unbind C-b
set-option -g prefix C-f
# bind-key µ send-prefix
# Key binding to reload config file
bind r source-file ~/.tmux.conf \; display "Reloaded config."
# COUNTING
# Make tabs count from 1
set -g base-index 1
# start pane index at 1
setw -g pane-base-index 0
# Customize bar
set -g status-justify left
# set refresh interval for status bar
set -g status-interval 5
set -g status-right-length 55
set -g status-left-length 20
set-option -g status "on"
# Default statusbar color
set-option -g status-style bg='#282c34',fg=colour223 # bg=bg1, fg=fg1
# Default window title colors
set-window-option -g window-status-style bg=colour214,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
set-window-option -g window-status-activity-style bg='#bf1b1b',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=colour214
# Set inactive pane border color
set-option -g pane-border-style fg=colour239
# Message info
set-option -g message-style bg='#282c34',fg='#abb2bf' # bg=bg2, fg=fg1
# Writing commands inactive
set-option -g message-command-style bg=colour239,fg=colour223 # bg=fg3, fg=bg1
# set-option -g message-command-style bg='#282c34',fg=colour223 # bg=fg3, fg=bg1
# Pane number display
set-option -g display-panes-active-colour colour1 #fg2
set-option -g display-panes-colour colour237 #bg1
# Clock (prefix+t)
set-window-option -g clock-mode-colour white #blue
# Bell
set-window-option -g window-status-bell-style bg=colour167,fg=colour235 # bg=red, fg=bg
set-option -g status-left "\
#[fg=#abb2bf, bg=colour241]#{?client_prefix,#[bg=colour167],} ❐ #S \
#[fg=colour241, bg=#282c34]#{?client_prefix,#[fg=colour167],}#{?window_zoomed_flag, 🔍 ,}"
set-option -g status-right ""
# set-option -g status-right "\
# #[fg=#394b6e, bg=#282c34] \
# #[fg=#e5c07b, bg=#394b6e, bold] 💻#(vmstat 1 2|tail -1|awk '{print 100-$15}')%\
# #[fg=#e5c07b, bg=#394b6e, bold] 🐏#(free -h |grep Mem | sed -E 's/ +/ /g' | cut -d' ' -f3)-#(free -h |grep Mem | sed -E 's/ +/ /g' | cut -d' ' -f2)\
# #[fg=#e5c07b, bg=#394b6e, bold] 🔋#(cat /sys/class/power_supply/BAT1/capacity)%\
# #[fg=#1b1857, bg=#394b6e] \
# #[fg=#e5c07b, bg=#1b1857] %d %b %Y \
# #[fg=#bf1b1b, bg=#1b1857]\
# #[fg=#e5c07b, bg=#bf1b1b] %H:%M \
# #[fg=colour248, bg=colour239]"
set-window-option -g window-status-current-format "\
#[fg=#282c34, bg=#98c379]\
#[fg=#282c34, bg=#98c379, bold] #I \
#[fg=#282c34, bg=#98c379, bold] #W \
#[fg=#98c379, bg=#282c34]"
set-window-option -g window-status-format "\
#[fg=#282c34,bg=#3e4452,noitalics]\
#[fg=#abb2bf,bg=#3e4452] #I \
#[fg=#abb2bf, bg=#3e4452] #W \
#[fg=#3e4452, bg=#282c34]"
set-window-option -g window-status-separator ''
# selection color
set -wg mode-style bg='#0087af',fg=black
# OTHERS
# Set new panes to open in current directory
bind c new-window -c "#{pane_current_path}"
bind '"' split-window -c "#{pane_current_path}"
bind % split-window -h -c "#{pane_current_path}"
# increase scroll-back history
set -g history-limit 10000
# use vim key bindings
setw -g mode-keys vi
# enable mouse
setw -g mouse on
# Prevent weird delay in Vim
set -sg escape-time 0
set -sg repeat-time 0
# re-number windows when one is closed
set -g renumber-windows on
# vim-like pane switching
bind -r ^ last-window
bind -r C-f last-window
bind -r k select-pane -U
bind -r j select-pane -D
bind -r h select-pane -L
bind -r l select-pane -R
# new sessions
bind S command-prompt -p "New Session:" "new-session -A -s '%%'"
bind K confirm kill-session
#copying
bind -T copy-mode-vi v send -X begin-selection
bind -T copy-mode-vi y send-keys -X copy-pipe-and-cancel 'xclip -in -selection clipboard'
bind P paste-buffer
bind -T copy-mode-vi MouseDragEnd1Pane send-keys -X copy-pipe-and-cancel "pbcopy"