Skip to content

Instantly share code, notes, and snippets.

@navotera
Last active March 31, 2023 23:37
Show Gist options
  • Save navotera/bc3c9a372ed4a2caff1e02c140f31ef9 to your computer and use it in GitHub Desktop.
Save navotera/bc3c9a372ed4a2caff1e02c140f31ef9 to your computer and use it in GitHub Desktop.
InstallOh-My-Posh-Windows10

InstallOh-My-Posh-Windows10

ALL THE PROCESS should be installed in the TERMINAL as Administrator (not Power Shell)

  1. Install scoop
iex (new-object net.webclient).downloadstring('https://get.scoop.sh')
  1. Install oh-my-posh using scoop
scoop install https://github.com/JanDeDobbeleer/oh-my-posh/releases/latest/download/oh-my-posh.json
  1. Install font (select Cascardia Nerd) - use administrator when using PowerShell
oh-my-posh font install
  1. Install terminal icon and PSLine - use administrator when using PowerShell
Install-Module -Name Terminal-Icons -Repository PSGallery
Install-Module PSReadLine -Force
  1. edit profile (lihat isi file dibawah) :
code $PROFILE

File name profile :

Import-Module -Name Terminal-Icons
oh-my-posh --init --shell pwsh --config 'https://raw.githubusercontent.com/JanDeDobbeleer/oh-my-posh/main/themes/honukai.omp.json' | Invoke-Expression

set-PSReadLineOption -EditMode Emacs
Set-PSReadLineOption -BellStyle None
Set-PSReadLineKeyHandler -Chord 'Ctrl+d' -Function DeleteChar
Set-PSReadLineOption -PredictionSource History
Set-PSReadLineOption -PredictionViewStyle ListView
Get-TerminalIconsIconTheme

Set-PSReadlineKeyHandler -Key Tab -Function HistorySearchForward
  1. On your Terminal app (not Power Shell) click CTRL+SHIFT+, add this on the profile block
"font": {
        "face": "CaskaydiaCove Nerd Font",
        "size": 10
      },
      "padding": "4, 2",
      "useAcrylic": false,
      "acrylicOpacity": 0.8,
      "backgroundImage": null,
      "tabColor": "#282C34",
      "cursorColor": "#bbc2cf",
      "scrollbarState": "hidden"

Check for duplicate or error syntax (by using vscode)

Restart your windows

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