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
Instalar Fuentes de Nerd Fonts: https://www.nerdfonts.com/font-downloads
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
Editar el archivo.
Instalar sudo
$> $script_path="$HOME\Documents\Scripts"; if (!(test-path $script_path)) {New-Item -ItemType directory $script_path} if (!(test-path $profile)) { new-item -path $profile -itemtype file -force }". $script_path\sudo.ps1" | Out-File $profile -append; "function sudo(){if (`$args.Length -eq 1){start-process `$args[0] -verb `"runAs`"} if (`$args.Length -gt 1){start-process `$args[0] -ArgumentList `$args[1..`$args.Length] -verb `"runAs`"}}" | Out-File $script_path\sudo.ps1; powershell
Instalar Neovim
$> iwr -useb get.scoop.sh | iex
$> scoop install curl sudo jq
$> scoop install neovim gcc
$> sudo touch ~/AppData/Local/nvim/init.vim
$> sudo nvim ~/AppData/Local/nvim/init.vim
set number
syntax on
set cursorline
set mouse=r
set clipboard=unnamed
set encoding=utf-8
set showmatch
set sw=2
set autoindent
set laststatus=2
set tabstop=2
set noswapfile
set nobackup
set undofile
$> 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
Espesor Fuente: Mediano
Estilo de Texto: Fuente negrita con colores brillantes
Opacidad:98