forked from arupbg/dotfiles
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.tmux.conf
175 lines (136 loc) · 5.9 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
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
set -g @plugin 'tmux-plugins/tpm'
set -g @plugin 'tmux-plugins/tmux-sensible'
set -g @plugin 'tmux-plugins/tmux-resurrect'
set -g @plugin 'tmux-plugins/tmux-yank'
set -g @plugin 'tmux-plugins/tmux-open'
set -g @plugin 'thewtex/tmux-mem-cpu-load'
set -g @plugin 'tmux-plugins/tmux-cpu'
set -g @plugin 'Nelyah/tmux-onedark-theme'
set -g @open-S 'https://www.duckduckgo.com/'
set -g @open 'x'
set -g @open-editor 'C-x'
# set -g @plugin 'tmux-plugins/tmux-continuum'
set -g @continuum-restore 'on'
# set -g @plugin 'christoomey/vim-tmux-navigator'
run '~/dotfiles/.tmux/plugins/tpm/tpm'
# Set the prefix to `ctrl + a` instead of `ctrl + b`
unbind C-b
set-option -g prefix C-a
bind-key C-a send-prefix
## remap prefix from 'C-b' to 'C-a'
#unbind C-b
#unbind 'C-\'
#set-option -g prefix M-a
#bind-key M-a send-prefix
#set -g history-limit 30000
# split panes using | and -
bind h split-window -h
bind v split-window -v
unbind '"'
unbind %
## reload config file (change file location to your the tmux.conf you want to use)
bind r source-file ~/.tmux.conf
## Smart pane switching with awareness of Vim splits.
## See: https://github.com/christoomey/vim-tmux-navigator
is_vim="ps -o state= -o comm= -t '#{pane_tty}' \
| grep -iqE '^[^TXZ ]+ +(\\S+\\/)?g?(view|n?vim?x?)(diff)?$'"
bind-key -n M-h if-shell "$is_vim" "send-keys M-h" "select-pane -L"
bind-key -n M-j if-shell "$is_vim" "send-keys M-j" "select-pane -D"
bind-key -n M-k if-shell "$is_vim" "send-keys M-k" "select-pane -U"
bind-key -n M-l if-shell "$is_vim" "send-keys M-l" "select-pane -R"
bind-key -n M-\ if-shell "$is_vim" "send-keys M-\\" "select-pane -l"
bind-key -T copy-mode-vi M-h select-pane -L
bind-key -T copy-mode-vi M-j select-pane -D
bind-key -T copy-mode-vi M-k select-pane -U
bind-key -T copy-mode-vi M-l select-pane -R
bind-key -T copy-mode-vi M-\ select-pane -l
setw -g mode-keys vi
## switch panes using Alt-arrow without prefix
bind -n M-Left select-pane -L
bind -n M-Right select-pane -R
bind -n M-Up select-pane -U
bind -n M-Down select-pane -D
## Enable mouse mode (tmux 2.1 and above)
set -g mouse on
# don't rename windows automatically
set-option -g allow-rename off
# fixing VIM issue
set -s escape-time 0
###############################################################################
############# Date/Time values that can be displayed in the status line
###############################################################################
# $(echo $USER) - shows the current username
# %a --> Day of week (Mon)
# %A --> Day of week Expanded (Monday)
# %b --> Month (Jan)
# %d --> Day (31)
# %Y --> Year (2017)
# %D --> Month/Day/Year (12/31/2017)
# %v --> Day-Month-Year (31-Dec-2017)
# %r --> Hour:Min:Sec AM/PM (12:30:27 PM)
# %T --> 24 Hour:Min:Sec (16:30:27)
# %X --> Hour:Min:Sec (12:30:27)
# %R --> 24 Hour:Min (16:30)
# %H --> 24 Hour (16)
# %l --> Hour (12)
# %M --> Mins (30)
# %S --> Seconds (09)
# %p --> AM/PM (AM)
# For a more complete list view: https://linux.die.net/man/3/strftime
##############
# Settings #
##############
# set -g status-justify left
set -g status-interval 2
set-option -g visual-activity off
set-option -g visual-bell off
set-option -g visual-silence off
# setw -g monitor-activity on
# set -g visual-activity on
set-option -g bell-action none
# set -g default-terminal "xterm-256color"
# set -g default-terminal "xterm-24bit"
# set -g terminal-overrides ',xterm-24bit:Tc'
set -g default-terminal "xterm-256color"
set-option -ga terminal-overrides ",xterm-256color:Tc"
###########
# Panes #
###########
# set inactive/active window styles
set -g window-style 'fg=colour247,bg=#282c34'
set -g window-active-style 'fg=#abb2bf,bg=#282c34'
set -g pane-border-bg '#282c34'
set -g pane-border-fg '#484c54'
set -g pane-active-border-bg '#282c34'
set -g pane-active-border-fg '#484c54'
###############
# Statusbar #
###############
# modes
setw -g clock-mode-colour colour5
setw -g mode-attr bold
setw -g mode-fg colour75
set -g status-position bottom
set -g status-bg '#282c34'
set -g status-left ''
setw -g window-status-current-format ' #I#[fg=colour249]:#[fg=colour255]#W#[fg=colour249]#F '
setw -g window-status-current-fg colour75
setw -g window-status-current-bg colour237
setw -g window-status-current-attr bold
setw -g window-status-current-format ' #I#[fg=colour250]:#[fg=colour255]#W#[fg=colour249]#F '
setw -g window-status-fg colour9
setw -g window-status-attr none
setw -g window-status-format ' #I#[fg=colour237]:#[fg=colour250]#W#[fg=colour244]#F '
setw -g window-status-bell-attr bold
setw -g window-status-bell-fg colour255
setw -g window-status-bell-bg colour75
set -g message-attr bold
set -g message-fg colour232
set -g message-bg colour166
set -g status-interval 2
# length of tmux status line
set -g status-left-length 30
set -g status-right-length 350
#set -g status-right '🗠#[bg=$(~/.tmux/plugins/tmux-cpu/scripts/cpu_bg_color.sh),fg=$(~/.tmux/plugins/tmux-cpu/scripts/cpu_fg_color.sh)]#(~/.tmux/plugins/tmux-cpu/scripts/cpu_percentage.sh) #[default]#[fg=colour16,bg=#484c54] 💻#h #(ifconfig eno1 | grep --color=never "inet " | awk "{print \$2}") #[fg=colour233,bg=#585c64,bold] %d/%m #[fg=colour233,bg=#888c94,bold] %H:%M:%S '
set -g status-right '#[default]#[fg=colour16,bg=#484c54] 📤 #(~/dotfiles/tmux_scripts/tmuxmail.sh) #[default]#[fg=colour233,bg=#585c64,bold] 🥶 #(~/dotfiles/.tmux/tmux-plugins/tmux-cpu/scripts/cpu_percentage.sh) #[default]#[fg=colour16,bg=#484c54] 💻#h #(ifconfig eno1 | grep --color=never "inet " | awk "{print \$2}") #[fg=colour233,bg=#585c64,bold] %d/%m #[fg=colour233,bg=#888c94,bold] %H:%M:%S '
#set -g status-right '#[default]#[fg=colour16,bg=#484c54] 📤 #(~/dotfiles/tmux_scripts/tmuxmail.sh) #[default]#[fg=colour233,bg=#585c64,bold] 🥶 #(~/dotfiles/.tmux/tmux-plugins/tmux-cpu/scripts/cpu_percentage.sh) #[default]#[fg=colour16,bg=#484c54] 💻#h #(ifconfig eno1 | grep --color=never "inet " | awk "{print \$2}") #[fg=colour233,bg=#585c64,bold] %d/%m #[fg=colour233,bg=#888c94,bold] %H:%M:%S '