lunes, 20 de junio de 2022

Ubicacion de los temas Windows 10/11

Ubicación de los temas Windows 10/11

C:\Windows\Web\

Eliminar todos los archivos
C:\Users\users\AppData\Local\Packages\Microsoft.Windows.ContentDeliveryManager_cw5n1h2txyewy\LocalState\Assets

martes, 14 de junio de 2022

Instalar Oh My Posh en Powershell

Actualizar Powershell

Verificar la version de powershell
$> Get-Host | Select-Object Version

Instalar Powershell Version 7
$> winget search powershell
$> winget install Microsoft.Powershell

Actualizar Powershell 7
$> iex "& { $(irm https://aka.ms/install-powershell.ps1) } -UseMSI"


Instalar Oh My Posh en Powershell
===================================
Ejecutar como administrador powershell 7
$> Set-ExecutionPolicy Bypass -Scope Process -Force; Invoke-Expression ((New-Object System.Net.WebClient).DownloadString('https://ohmyposh.dev/install.ps1'))

Instalar Fuente: https://github.com/ryanoasis/nerd-fonts/releases/download/v2.1.0/Meslo.zip
Cambiar la Fuente Powershell -> MesloLGM NF
$> New-Item -Path $PROFILE -Type File -Force
$> notepad $PROFILE
oh-my-posh init pwsh --config "$env:POSH_THEMES_PATH\aliens.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
Import-Module -Name Terminal-Icons

Autocompletado
$> Install-Module PSReadLine -AllowPrerelease -Force
$> notepad $PROFILE
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

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 90   Filas:22
Tipo Fuente: Hack Nerd Font Mono
Tamaño Fuente: 14
Espesor Fuente: Mediano
Estilo de Texto: Fuente negrita con colores brillantes
Opacidad:97

Instalar Powershell 7

Instalar Powershell Version 7 -------------------------------------- $> winget search powershell $> winget install Microsoft.Powershe...