Skip to content

Instantly share code, notes, and snippets.

@cleytonferrari
Last active July 11, 2022 22:44
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save cleytonferrari/3358743d51737e580af083e4069108e1 to your computer and use it in GitHub Desktop.
Save cleytonferrari/3358743d51737e580af083e4069108e1 to your computer and use it in GitHub Desktop.

Oh My Posh - Windows Terminal

UPDATE 11/07/2022

Remova o modulo no powershell:

Uninstall-Module oh-my-posh -AllVersions

Realize a instalação: https://ohmyposh.dev/docs/installation/windows

Execute no powershell o comando abaixo

notepad $profile

Caso o Profile não exista, ele irá criar um. Adicione o seguinte texto no arquivo aberto:

oh-my-posh init pwsh --config "$env:POSH_THEMES_PATH\paradox.omp.json" | Invoke-Expression

Pronto! Salve e reinicie o terminal do powershell.

Siga os passos "Corrigir problema da fonte com icones" para instalar a fonte e corrigir os icones :)

Para ver os temas, disponiveis acesse: https://ohmyposh.dev/docs/themes


Primeiro passo é instalar o seguintes modulos no powershell:

Install-Module posh-git -Scope CurrentUser
Install-Module -Name oh-my-posh -Scope CurrentUser

Como administrador, set a configuração abaixo:

Set-ExecutionPolicy Unrestricted

Feche o modo administrador, e execute no powershell o comando abaixo

notepad $profile

Caso o Profile não exista, ele irá criar um. Adicione o seguinte texto no arquivo aberto:

Import-Module posh-git
Import-Module oh-my-posh
Set-PoshPrompt -Theme paradox

Pronto! Salve e reinicie o terminal do powershell.

Corrigir problema da fonte com icones

Para corrigir problema da fonte, você deve instalar a fonte Cascadia Code PL no seu Windows.

No arquivo baixado, procure pela pasta ttf e instale as seguintes fontes:

  • CascadiaCodePL
  • CascadiaMonoPL

Agora basta adicionar a fonte "Cascadia Code PL" como fonte padrão do Windows Terminal, para os icones serem exibidos.

Para isto, abra o Windows Terminal e clique em configurações, depois clique em "abrir o arquivo JSON" para configurar a nova fonte.

Procure a seção "profiles" e dentro dela procure por "defaults", para adicionar a fonte, siga o modelo abaixo:

"defaults": 
        {
            "acrylicOpacity": 0.80000000000000004,
            "fontFace": "Cascadia Code PL",
            "fontSize": 12,
            "useAcrylic": true
        }

Para saber mais https://www.youtube.com/watch?v=lu__oGZVT98

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment