From f69e215c61f6cc318be6ee4c678198ebac00e0ee Mon Sep 17 00:00:00 2001 From: "eusener@gmail.com" Date: Fri, 6 Nov 2026 17:46:08 -0300 Subject: [PATCH] =?UTF-8?q?feat(catalog):=20bot=C3=A3o=20+=20estreito=20na?= =?UTF-8?q?s=20abas=20do=20kitty,=20fonte=2013=20e=20margem=20na=20janela?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Mostra o botão de nova aba com largura de 3 colunas, usando um tab_bar.py que mantém o estilo fade nas demais abas. Sobe a fonte para 13 e adiciona margem inferior de 10 nas janelas. --- README.md | 4 ++-- catalog/configs/kitty/kitty.conf | 6 ++++-- catalog/configs/kitty/tab_bar.py | 9 +++++++++ catalog/items/kitty.yaml | 4 +++- 4 files changed, 18 insertions(+), 5 deletions(-) create mode 100644 catalog/configs/kitty/tab_bar.py diff --git a/README.md b/README.md index dc07d47..f82e175 100644 --- a/README.md +++ b/README.md @@ -268,8 +268,8 @@ O laravel-ls não tem release para Linux arm64 e é pulado nessa plataforma. As configs opinativas do terminal (todas opcionais e com backup): -- **kitty**: JetBrainsMono Nerd Font 12, abas compactas no topo (estilo - `fade`), fundo translúcido (80% de opacidade) com desfoque, tema Afterglow fixo (claro e escuro), e abas/janelas novas no +- **kitty**: JetBrainsMono Nerd Font 13, abas compactas no topo (estilo + `fade`, com botão `+` estreito para abrir abas), fundo translúcido (80% de opacidade) com desfoque, tema Afterglow fixo (claro e escuro), e abas/janelas novas no diretório atual (`cmd+t`, `cmd+enter`, `cmd+n`; no Linux `ctrl+shift+t`, `ctrl+shift+enter`, `ctrl+shift+n`). - **herdr**: tema gruvbox, notificações no próprio herdr, atalhos dos plugins e diff --git a/catalog/configs/kitty/kitty.conf b/catalog/configs/kitty/kitty.conf index 794a565..fc5d73b 100644 --- a/catalog/configs/kitty/kitty.conf +++ b/catalog/configs/kitty/kitty.conf @@ -5,13 +5,15 @@ font_family family="JetBrainsMono Nerd Font Mono" bold_font auto italic_font auto bold_italic_font auto -font_size 12.0 +font_size 13.0 disable_ligatures never tab_bar_edge top -tab_bar_style fade +tab_bar_style custom tab_title_template " {index}: {title} " +tab_bar_show_new_tab_button yes tab_bar_margin_height 2 2 +window_margin_width 0 0 10 0 background_opacity 0.80 background_blur 20 diff --git a/catalog/configs/kitty/tab_bar.py b/catalog/configs/kitty/tab_bar.py new file mode 100644 index 0000000..a42bd0d --- /dev/null +++ b/catalog/configs/kitty/tab_bar.py @@ -0,0 +1,9 @@ +# Mantém o estilo fade nas abas e desenha o botão "+" estreito (3 células). +from kitty.tab_bar import draw_tab_with_fade + + +def draw_tab(draw_data, screen, tab, before, max_tab_length, index, is_last, extra_data): + if tab.tab_id < 0: # botão "+" (aba sintética do kitty) + screen.draw(' + ') + return screen.cursor.x + return draw_tab_with_fade(draw_data, screen, tab, before, max_tab_length, index, is_last, extra_data) diff --git a/catalog/items/kitty.yaml b/catalog/items/kitty.yaml index 655067f..d9cd1c1 100644 --- a/catalog/items/kitty.yaml +++ b/catalog/items/kitty.yaml @@ -24,11 +24,13 @@ post_install: fi configs: - id: kitty-config - description: {en: "JetBrainsMono Nerd Font, tabs on top, translucent background, new tabs in the current directory", pt-BR: "JetBrainsMono Nerd Font, abas no topo, fundo translúcido, abas novas no diretório atual"} + description: {en: "JetBrainsMono Nerd Font, tabs on top with a compact + button, translucent background, new tabs in the current directory", pt-BR: "JetBrainsMono Nerd Font, abas no topo com botão + compacto, fundo translúcido, abas novas no diretório atual"} default: true files: - template: configs/kitty/kitty.conf target: "{{.XDG_CONFIG}}/kitty/kitty.conf" + - template: configs/kitty/tab_bar.py + target: "{{.XDG_CONFIG}}/kitty/tab_bar.py" - id: kitty-theme description: {en: "Afterglow color theme, kept fixed in both light and dark system appearance", pt-BR: "Tema de cores Afterglow, fixo tanto no modo claro quanto no escuro do sistema"} default: true