Este guia mostra como configurar um terminal leve, moderno e bonito com:
- ✅ Kitty como emulador de terminal padrão
- ✅ Zsh
- ✅ fzf como buscador interativo e dinâmico
- ✅ bat como visualizador de arquivos enquanto pesquisa com fzf
- ✅ Powerlevel10k
- ✅ Autosuggestions e Syntax Highlighting
- ✅ Fonte Nerd Font com ícones e ligaduras ativadas
- ✅ Tema escuro compatível com Powerlevel10k
💡 Objetivo: Um terminal rápido, funcional e estiloso com baixo overhead e aparência profissional
sudo apt update
sudo apt install kittyAlternativamente, para a versão mais recente:
curl -L https://sw.kovidgoyal.net/kitty/installer.sh | shIsso instalará o Kitty em ~/.local/kitty.app. Para tornar o comando kitty disponível:
echo 'export PATH="$HOME/.local/kitty.app/bin:$PATH"' >> ~/.bashrc
source ~/.bashrccp ~/.local/kitty.app/share/applications/kitty.desktop ~/.local/share/applications/
sed -i "s|Exec=kitty|Exec=$HOME/.local/kitty.app/bin/kitty|" ~/.local/share/applications/kitty.desktopsudo apt install zsh
chsh -s $(which zsh)Reinicie o terminal e execute
zshna primeira inicialização.
mkdir -p ~/.local/share/fonts
cd ~/.local/share/fonts
wget https://github.com/romkatv/powerlevel10k-media/raw/master/MesloLGS%20NF%20Regular.ttf
wget https://github.com/romkatv/powerlevel10k-media/raw/master/MesloLGS%20NF%20Bold.ttf
wget https://github.com/romkatv/powerlevel10k-media/raw/master/MesloLGS%20NF%20Italic.ttf
wget https://github.com/romkatv/powerlevel10k-media/raw/master/MesloLGS%20NF%20Bold%20Italic.ttf
fc-cache -fvgit clone --depth=1 https://github.com/romkatv/powerlevel10k.git ~/.powerlevel10k
echo 'source ~/.powerlevel10k/powerlevel10k.zsh-theme' >> ~/.zshrcAo abrir o Kitty com Zsh pela primeira vez, será iniciado o p10k configure. Veja abaixo como configurá-lo.
O fzf é um utilitário de linha de comando que fornece uma interface de busca fuzzy. Você pode instalá-lo de duas maneiras: usando o gerenciador de pacotes apt ou clonando o repositório do GitHub.
Se você estiver em um sistema baseado em Debian ou Ubuntu, pode instalar o fzf diretamente usando o apt. Execute os seguintes comandos:
sudo apt update
sudo apt install fzfgit clone --depth 1 https://github.com/junegunn/fzf.git ~/.fzf
~/.fzf/install
git clone https://github.com/zsh-users/zsh-autosuggestions ~/.zsh/zsh-autosuggestions
echo 'source ~/.zsh/zsh-autosuggestions/zsh-autosuggestions.zsh' >> ~/.zshrc
git clone https://github.com/zsh-users/zsh-syntax-highlighting.git ~/.zsh/zsh-syntax-highlighting
echo 'source ~/.zsh/zsh-syntax-highlighting/zsh-syntax-highlighting.zsh' >> ~/.zshrcsource ~/.zsh/plugins/fzf-tab/fzf-tab.plugin.zshrc
📚 Etapa 8: Insira os atalhos para buscar arquivos, histórico de comandos digitados e branchs do git no ~/.zshrc
gh() {
eval "$(history | fzf --height 40% --border --reverse --prompt='Hist> ')"
}
gf() {
local file
file=$(fzf --height 40% --border --reverse --prompt='Arquivo> ')
[[ -n "$file" ]] && ${EDITOR:-vim} "$file"
}
gfp() {
local file
file=$(fzf --preview 'expand -t 2 {} | batcat --style=numbers --color=always --paging=never' --height 40% --border --reverse --prompt='Preview> ')
[[ -n "$file" ]] && ${EDITOR:-vim} "$file"
}
gb() {
local branch
branch=$(git branch | sed 's/* //' | fzf --height 40% --border --reverse --prompt='Branch> ')
[[ -n "$branch" ]] && git checkout "$branch"
}
Edite ~/.config/kitty/kitty.conf:
font_family MesloLGS Nerd Font
font_size 12.0
background_opacity 0.90
background #1e1e2e
enable_ligatures true
# Tema recomendado
include ~/.config/kitty/themes/Dracula.confPara usar um tema escuro como Dracula:
mkdir -p ~/.config/kitty/themes
curl -o ~/.config/kitty/themes/Dracula.conf https://raw.githubusercontent.com/dexpota/kitty-themes/master/themes/Dracula.confOutras opções de tema: https://github.com/dexpota/kitty-themes
💡 O Kitty não suporta blur real como o WezTerm, mas possui renderização acelerada por GPU que o torna extremamente rápido.
sudo update-alternatives --install /usr/bin/x-terminal-emulator x-terminal-emulator /usr/bin/kitty 60
sudo update-alternatives --config x-terminal-emulatorEscolha o número correspondente ao kitty.
- Kitty deve abrir com aparência semi-transparente
- Powerlevel10k deve aparecer ao iniciar Zsh
- Autocompletar e sugestões devem funcionar
- Syntax highlighting ativo
- Atalho gh, gf, gfp, gb devem abrir respectivamente uma busca dinâmica em histórico, arquivos, arquivos com pré-visualização e branchs
Se necessário, recarregue com:
source ~/.zshrcVocê configurou com sucesso um terminal moderno, leve e visualmente bonito com Kitty + Zsh + Powerlevel10k.
Confira o visual abaixo
Esse é meu zshrc, fique a vontade pra usar de referência ou copiar
# Enable Powerlevel10k instant prompt. Should stay close to the top of ~/.zshrc.
# Initialization code that may require console input (password prompts, [y/n]
# confirmations, etc.) must go above this block; everything else may go below.
if [[ -r "${XDG_CACHE_HOME:-$HOME/.cache}/p10k-instant-prompt-${(%):-%n}.zsh" ]]; then
source "${XDG_CACHE_HOME:-$HOME/.cache}/p10k-instant-prompt-${(%):-%n}.zsh"
fi
# ─── Configurações gerais ──────────────────────────────────────
export NEO_DISABLE_MITIGATIONS=1
export EDITOR="code" # ou code, vim, micro, etc
# ─── Powerlevel10k Theme ────────────────────────────────────────
source ~/.powerlevel10k/powerlevel10k.zsh-theme
[[ ! -f ~/.p10k.zsh ]] || source ~/.p10k.zsh
# ─── Autocomplete interno do Zsh ────────────────────────────────
autoload -Uz compinit && compinit
zstyle ':completion:*' menu select
# ─── Histórico de comandos ─────────────────────────────────────
HISTFILE=~/.zsh_history # Onde o histórico é salvo
HISTSIZE=10000 # Quantos comandos manter em memória
SAVEHIST=10000 # Quantos comandos salvar no arquivo
setopt HIST_IGNORE_DUPS # Ignora comandos duplicados seguidos
setopt HIST_IGNORE_ALL_DUPS # Remove duplicados antigos ao repetir
setopt HIST_FIND_NO_DUPS # Evita mostrar duplicados com ↑
setopt HIST_REDUCE_BLANKS # Remove espaços extras
setopt INC_APPEND_HISTORY # Salva no histórico à medida que usa
setopt SHARE_HISTORY # Compartilha histórico entre sessões
# Opcional: atualiza sugestões ao digitar (para zsh-autosuggestions)
zstyle ':zsh-autosuggestions:' history-ignore-space true
# ─── Plugins ───────────────────────────────────────────────────
# Sugestões baseadas no histórico (esmaecidas)
source ~/.zsh/zsh-autosuggestions/zsh-autosuggestions.zsh
# Realce de sintaxe no terminal
source ~/.zsh/zsh-syntax-highlighting/zsh-syntax-highlighting.zsh
# Autocomplete visual ao pressionar Tab (fzf-tab)
source ~/.zsh/plugins/fzf-tab/fzf-tab.plugin.zsh
# ─── FZF Atalhos úteis ──────────────────────────────────────────
# Buscar e executar comando do histórico
gh() {
eval "$(history | fzf --height 40% --border --reverse --prompt='Hist> ')"
}
# Abrir arquivos com fuzzy
gf() {
local file
file=$(fzf --height 40% --border --reverse --prompt='Arquivo> ')
[[ -n "$file" ]] && ${EDITOR:-vim} "$file"
}
# Abrir arquivos com preview
gfp() {
local file
file=$(fzf --preview 'expand -t 2 {} | batcat --style=numbers --color=always --paging=never' --height 40% --border --reverse --prompt='Preview> ')
[[ -n "$file" ]] && ${EDITOR:-vim} "$file"
}
# Trocar de branch do Git com fuzzy
gb() {
local branch
branch=$(git branch | sed 's/* //' | fzf --height 40% --border --reverse --prompt='Branch> ')
[[ -n "$branch" ]] && git checkout "$branch"
}
# ─── Node Version Manager ───────────────────────────────────────
export NVM_DIR="$HOME/.nvm"
[ -s "$NVM_DIR/nvm.sh" ] && \. "$NVM_DIR/nvm.sh" # This loads nvm
[ -s "$NVM_DIR/bash_completion" ] && \. "$NVM_DIR/bash_completion" # This loads nvm bash_completion
# ─── SDKMAN ─────────────────────────────────────────────────────
#THIS MUST BE AT THE END OF THE FILE FOR SDKMAN TO WORK!!!
export SDKMAN_DIR="$HOME/.sdkman"
[[ -s "$HOME/.sdkman/bin/sdkman-init.sh" ]] && source "$HOME/.sdkman/bin/sdkman-init.sh"






Muito massa meu amigo, já usei o Powerlevel uns anos, mas confesso que hoje o Spaceship está no meu coração, mas não conhecia o Kitty, boa!