Skip to content

Instantly share code, notes, and snippets.

@Kinjalrk2k
Last active September 6, 2021 09:55
Show Gist options
  • Save Kinjalrk2k/1de87f199597ed6bddb039172f18157f to your computer and use it in GitHub Desktop.
Save Kinjalrk2k/1de87f199597ed6bddb039172f18157f to your computer and use it in GitHub Desktop.
My Powershell Oh-my-Posh custom theme

Powershell Customization

image

Installation

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

Configuration

# $PROFILE

Import-Module posh-git
Import-Module oh-my-posh
Set-PoshPrompt -Theme hotstick.minimal
  • Set theme
Set-PoshPrompt -Theme hotstick.minimal
  • Replace the default theme at
C:\Program Files\WindowsPowerShell\Modules\oh-my-posh\<version>\themes\hotstick.minimal.omp.json
{
"$schema": "https://raw.githubusercontent.com/JanDeDobbeleer/oh-my-posh/main/themes/schema.json",
"final_space": true,
"osc99": true,
"console_title": true,
"console_title_style": "template",
"console_title_template": "{{.Folder}}{{if .Root}} :: root{{end}} :: {{.Shell}}",
"blocks": [
{
"type": "prompt",
"alignment": "left",
"horizontal_offset": 0,
"vertical_offset": 1,
"segments": [
{
"type": "text",
"style": "plain",
"foreground": "#6c7591",
"properties": {
"text": "Kinjal™ "
}
},
{
"type": "path",
"style": "powerline",
"powerline_symbol": "",
"invert_powerline": false,
"foreground": "#a140fc",
"foreground_templates": null,
"background_templates": null,
"leading_diamond": " ",
"trailing_diamond": "",
"properties": {
"style": "folder"
}
},
{
"type": "git",
"style": "plain",
"powerline_symbol": "",
"invert_powerline": false,
"foreground": "#63ee12",
"foreground_templates": null,
"background_templates": null,
"leading_diamond": "",
"trailing_diamond": "",
"properties": {
"prefix": "",
"display_status_detail": true,
"branch_icon": "  ",
"branch_identical_icon": "",
"branch_ahead_icon": "↑",
"branch_behind_icon": "↓",
"branch_gone": "≢",
"local_working_icon": "",
"local_staged_icon": "",
"stash_count_icon": "",
"commit_icon": "▷ ",
"add_icon": "烙 ",
"tag_icon": "▶ ",
"rebase_icon": "Ɫ ",
"cherry_pick_icon": "✓ ",
"merge_icon": "◴ ",
"no_commits_icon": "[no commits]",
"status_separator_icon": " │"
}
},
{
"type": "text",
"style": "powerline",
"foreground": "red",
"properties": {
"text": "$>"
}
}
]
}
]
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment