Guides
Fundamentos ▾
Versionamento ▾
Deploy ▾
Onde cada parte roda: Servidor (via SSH): Zsh, Oh My Zsh, Powerlevel10k, plugins. Máquina local: fonte MesloLGS NF + configuração no emulador de terminal.

1 Fonte MesloLGS NF máquina local

A fonte precisa estar na máquina de onde você conecta, não no servidor — o emulador de terminal local que renderiza os caracteres do Powerlevel10k.

Linux

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 -fv

macOS

brew install --cask font-meslo-lg-nerd-font

Windows (instalar no Windows, não no WSL)

# PowerShell
$fonts = @("MesloLGS%20NF%20Regular.ttf","MesloLGS%20NF%20Bold.ttf","MesloLGS%20NF%20Italic.ttf","MesloLGS%20NF%20Bold%20Italic.ttf")
$base = "https://github.com/romkatv/powerlevel10k-media/raw/master"
foreach ($f in $fonts) {
  Invoke-WebRequest "$base/$f" -OutFile "$env:TEMP\$f"
  Copy-Item "$env:TEMP\$f" "C:\Windows\Fonts\"
}

Configurar a fonte no terminal

TerminalCaminho
GNOME TerminalPreferências → Perfil → Texto → Fonte personalizada
iTerm2 (macOS)Settings → Profiles → Text → Font
Windows TerminalSettings → (perfil WSL) → Appearance → Font face
VS Code terminal"terminal.integrated.fontFamily": "MesloLGS NF"

2 Zsh servidor

sudo apt update && sudo apt install zsh -y
chsh -s $(which zsh)        # define como shell padrão

Feche e reabra a sessão SSH. Na primeira execução, pressione q para sair sem criar nada — o Oh My Zsh cria o .zshrc a seguir.

echo $SHELL   # deve retornar /usr/bin/zsh ou /bin/zsh

3 Oh My Zsh servidor

sh -c "$(curl -fsSL https://raw.githubusercontent.com/ohmyzsh/ohmyzsh/master/tools/install.sh)"

Cria ~/.zshrc, define Zsh como padrão e faz backup do .zshrc anterior.

4 Powerlevel10k servidor

git clone --depth=1 https://github.com/romkatv/powerlevel10k.git \
  ${ZSH_CUSTOM:-$HOME/.oh-my-zsh/custom}/themes/powerlevel10k

No ~/.zshrc, altere:

ZSH_THEME="powerlevel10k/powerlevel10k"
source ~/.zshrc   # inicia assistente de configuração automaticamente
# ou manualmente:
p10k configure
Dica: Se ícones aparecerem como quadrados, a fonte não está configurada na máquina local — volte à Seção 1.

5 Plugins servidor

zsh-autosuggestions

git clone https://github.com/zsh-users/zsh-autosuggestions \
  ${ZSH_CUSTOM:-~/.oh-my-zsh/custom}/plugins/zsh-autosuggestions

zsh-syntax-highlighting

git clone https://github.com/zsh-users/zsh-syntax-highlighting.git \
  ${ZSH_CUSTOM:-~/.oh-my-zsh/custom}/plugins/zsh-syntax-highlighting
Importante: zsh-syntax-highlighting deve ser o último plugin na lista.

zsh-completions

git clone https://github.com/zsh-users/zsh-completions \
  ${ZSH_CUSTOM:-~/.oh-my-zsh/custom}/plugins/zsh-completions

fzf — busca fuzzy

sudo apt install fzf -y

6 Aliases e Variáveis

# adicionar ao ~/.zshrc após source $ZSH/oh-my-zsh.sh
export EDITOR=nvim
alias vim='nvim'
alias clip='xclip -sel clip'    # sudo apt install xclip -y

7 Ativar Plugins no .zshrc

plugins=(
  git
  z
  fzf
  zsh-autosuggestions
  zsh-syntax-highlighting
  zsh-completions
)

autoload -U compinit && compinit

source /usr/share/doc/fzf/examples/key-bindings.zsh
source ~/.zshrc

8 .zshrc Final

# Powerlevel10k instant prompt
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

export ZSH="$HOME/.oh-my-zsh"
ZSH_THEME="powerlevel10k/powerlevel10k"

plugins=(
  git
  z
  fzf
  zsh-autosuggestions
  zsh-syntax-highlighting
  zsh-completions
)

source $ZSH/oh-my-zsh.sh
autoload -U compinit && compinit

export EDITOR=nvim
alias vim='nvim'
alias clip='xclip -sel clip'

source /usr/share/doc/fzf/examples/key-bindings.zsh
[[ ! -f ~/.p10k.zsh ]] || source ~/.p10k.zsh

9 Solução de Problemas

ProblemaSolução
Ícones aparecem como ? ou quadradosInstale MesloLGS NF na máquina local e configure no terminal (Seção 1)
Prompt não mudousource ~/.zshrc ou abra nova sessão SSH
Assistente p10k não inicioup10k configure manualmente
Plugin não funcionals ~/.oh-my-zsh/custom/plugins/ — confirme que o nome bate