-
Notifications
You must be signed in to change notification settings - Fork 0
/
.tmux.conf
202 lines (167 loc) · 6.46 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
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
# ~/.tmux.conf
#
# meleu: minha configuração do tmux.
#
# Os comandos que possuem dependências de comandos
# externos estão marcados como DEP no comentário. ;)
#
###############################################################################
# configurações pra quem vem do GNU Screen
###############################################################################
# definindo o comando de prefixo como ^a
set -g prefix C-a
# alternar entre as duas últimas janelas com ^a ^a
unbind l
bind C-a last-window
# enviar ^a para o programa que está sendo executado na janela corrente.
bind a send-prefix
###############################################################################
# config sugerida no video https://youtu.be/DzNmUNvnB04
###############################################################################
# <prefix> com <C-Space>
# unbind C-b
# set -g prefix C-Space
# bind C-Space send-prefix
# enable mouse
set -g mouse on
# "fix the colors"
set-option -sa terminal-overrides ",xterm*:Tc"
###############################################################################
# clipboard
###############################################################################
# DEP: xclip - disponível com 'apt install xclip'
# DEP: tmux 3.2+
# set -s copy-command 'xclip -selection c' # Linux
set -s copy-command 'pbcopy' # MacOS
###############################################################################
# personalizações diversas
###############################################################################
# recarregar as configurações
bind r source-file ~/.tmux.conf \; display-message " ~/.tmux.conf reloaded..."
# iniciando contagem das janelas em 1 (e não em 0)
set -g base-index 1
# renumera as janelas automaticamente
set -g renumber-windows on
# ^a | divide a janela verticalmente
bind \\ split-window -h -c '#{pane_current_path}'
# ^a - divide a janela horizontalmente
bind - split-window -v -c '#{pane_current_path}'
# ^a c - cria uma nova janela no mesmo path
bind c new-window -c '#{pane_current_path}'
# transforma o painel em uma janela dedicada
bind b break-pane -d
# monitorando atividade em outras janelas
setw -g monitor-activity on
set -g visual-activity on
# usar Tab para alternar entre painéis
unbind Tab
bind Tab select-pane -t :.+
# alternar entre painéis com ^h, ,^j, ^k e ^l
# bind -n C-h select-pane -L
# bind -n C-j select-pane -D
# bind -n C-k select-pane -U
# bind -n C-l select-pane -R
bind-key h select-pane -L
bind-key j select-pane -D
bind-key k select-pane -U
bind-key l select-pane -R
# redimensionar painéis com ^a ^h, ^a ^j, ^a ^k, ^a ^l (vimlike)
bind -r C-h resize-pane -L 5
bind -r C-j resize-pane -D 5
bind -r C-k resize-pane -U 5
bind -r C-l resize-pane -R 5
# abrir uma manpage com ^a /
bind / command-prompt "split-window -h 'exec man %%'"
# ^a h para ir para a janela à esquerda
bind -r H select-window -t :-
# ^a l para ir para a janelas à direita
bind -r L select-window -t :+
# usando teclado como no vim
setw -g mode-keys vi
#bind -t vi-copy v begin-selection
#bind -t vi-copy y copy-selection
# configs sugeridas pelo neovim :checkhealth
set -sg escape-time 10
set -g focus-events on
# set -g default-terminal tmux-256color
###############################################################################
# barra de status
# (all commented because I'm trying the catppuccin plugin)
###############################################################################
# # ativando barra de status (redundancia, já é ativada por padrão)
# set -g status on
#
# # tags para usar com o '#'
# # #H host
# # #I current window index
# # #P current pane index
# # #S session name
# # #T current window title
# # #W current window name
# # #F window flag
# # possíveis flags:
# # Símbolo Significado
# # * janela atual
# # - última janela utilizada
# # # atividade detectada em janela monitorada
# # ! ocorreu um beep nesta janela
# # + o conteúdo que está sendo monitorado nesta janela apareceu
# # ~ janela silenciada pelo intervalo monitor-silence
# # Z foi dado zoom no painel da janela
#
# set -g status-left "#[fg=cyan,bg=black]"
# set -ag status-left " #S |"
# set -ag status-left "#[bg=cyan] "
#
# # configurando a barra de janelas
# # janelas inativas "[#índice:#nomedajanela#flag]"
# set -g window-status-format "#I:#W#F"
#
# # janela atual "(#janela#flag)"
# set -g window-status-current-format "#[fg=brightred,bg=black]"
# set -ag window-status-current-format "(#W#F)"
#
# # cores da barra de janelas
# set -g status-fg black
# set -g status-bg cyan
#
# # mostrar o nome da session com no máximo 50 chars
# # set -g status-left-length
#
# # hora (HH:MM) na direita (a formatação da hora pode
# # ser feita como em strftime, basta olhar na manpage)
# set -g status-right "#[fg=cyan,bg=black]"
# set -ag status-right "| %Y-%m-%d - %R"
###############################################################################
# list of plugins
###############################################################################
set -g @plugin 'tmux-plugins/tpm'
# set -g @plugin 'tmux-plugins/tmux-sensible'
set -g @plugin 'catppuccin/tmux'
set -g @plugin 'christoomey/vim-tmux-navigator'
set -g @plugin 'jimeh/tmuxifier'
###############################################################################
# catppuccin status-bar config
# https://github.com/catppuccin/tmux
###############################################################################
set -g @catppuccin_window_left_separator ""
set -g @catppuccin_window_right_separator ""
set -g @catppuccin_window_middle_separator "█"
set -g @catppuccin_window_number_position "left"
set -g @catppuccin_window_default_fill "number"
set -g @catppuccin_window_default_text "#W#F"
set -g @catppuccin_window_current_fill "number"
set -g @catppuccin_window_current_text "#W#F"
set -g @catppuccin_status_modules_left ""
set -g @catppuccin_status_modules_right "directory session"
set -g @catppuccin_status_left_separator ""
set -g @catppuccin_status_right_separator ""
set -g @catppuccin_status_fill "icon"
set -g @catppuccin_status_connect_separator "no"
# replace the directory text with a shorter version (home dir is replaced by ~)
set -g @catppuccin_directory_text "#{s|#{HOME}|~|:pane_current_path}"
###############################################################################
# initialize TMUX plugin manager
# (keep this line at the very bottom of tmux.conf)
###############################################################################
run '~/.tmux/plugins/tpm/tpm'