Instalar Powershell Version 7
$> winget search powershell
$> winget install Microsoft.Powershell
$> winget install Microsoft.Powershell
Abrir Powershell 7
Verificar la versión de powershell
$> Get-Host | Select-Object Version
Actualizar Powershell 7
$> iex "& { $(irm https://aka.ms/install-powershell.ps1) } -UseMSI"
Instalar Oh My Posh en Powershell
===================================
Ejecutar PowerShell 7 como administrador
Instalar Oh My Posh
$> Set-ExecutionPolicy Bypass -Scope Process -Force; Invoke-Expression ((New-Object System.Net.WebClient).DownloadString('https://ohmyposh.dev/install.ps1'))
Reiniciar la terminal
Verificar la versión Oh My Posh
$> oh-my-posh --version #25.23.3
Instalar Fuentes de Nerd Fonts: https://www.nerdfonts.com/font-downloads
https://github.com/ryanoasis/nerd-fonts/releases
Cambiar la Fuente Powershell -> CaskaydiaCove Nerd Font
Crear el archivo de perfil
$> New-Item -Path $PROFILE -Type File -Force
Agregar tema robbyrussell
$> notepad $PROFILE
oh-my-posh init pwsh --config "$env:POSH_THEMES_PATH\robbyrussell.omp.json" | Invoke-Expression
Instalar iconos
$> Install-Module -Name Terminal-Icons -Repository PSGallery
You are installing the modules from an untrusted repository.[Y][A]: Y
$> notepad $PROFILE
Al final de la línea agregar:
Import-Module -Name Terminal-Icons
Aplicar los cambios
$> . $PROFILE
Mostrar todos los temas
$> Get-PoshThemes
Ubicación de los themes:
%userprofile%\AppData\Local\Programs\oh-my-posh\themes
Configurar theme:
{
"foreground": "#98C379", #FFAFD7
"style": "plain",
"template": "\u279c", \u276f
"type": "text"
},
$> sudo notepad $PROFILE
clear-host
$Host.UI.RawUI.WindowTitle = "PowerShell"
oh-my-posh init pwsh --config "$env:POSH_THEMES_PATH\aliens.omp.json" | Invoke-Expression
Import-Module -Name Terminal-Icons
Set-PSReadLineOption -EditMode Emacs
Set-PSReadLineOption -BellStyle None
Set-PSReadLineKeyHandler -Chord 'Ctrl+d' -Function DeleteChar
Set-PSReadLineOption -PredictionSource History
function touch {set-content -Path ($args[0]) -Value ($null)}
Set-PSReadLineOption -PredictionSource History
Set-PSReadLineOption -PredictionViewStyle ListView
Set-Alias vim nvim
Set-Alias ll ls
$> . $PROFILE
Desactivar texto de inicio PowerShell
Ir Configuracion -> Setting.json
"commandline": "pwsh.exe -nologo",
"centerOnLaunch":true
"elevate": false,
Configurar Powershell
Tamaño de Terminal: colum 100 Filas:26
Tipo Fuente: Hack Nerd Font Mono ó CaskaydiaCove Nerd Font
Tamaño Fuente: 13.7
Espesor Fuente: Mediano
Estilo de Texto: Fuente negrita con colores brillantes
Opacidad:98
No hay comentarios:
Publicar un comentario