Skip to content

Instantly share code, notes, and snippets.

@ferrata
Last active May 6, 2022 17:16
Show Gist options
  • Save ferrata/96f7e121c687ee6a7409e54dbe86ce3d to your computer and use it in GitHub Desktop.
Save ferrata/96f7e121c687ee6a7409e54dbe86ce3d to your computer and use it in GitHub Desktop.
oh-my-posh template
{
"$schema": "https://raw.githubusercontent.com/JanDeDobbeleer/oh-my-posh/main/themes/schema.json",
"blocks": [
{
"alignment": "left",
"segments": [
{
"foreground": "#ffff00",
"background": "transparent",
"style": "diamond",
"template": "\uf0e7 admin ",
"type": "root"
},
{
"background": "#654eb8",
"foreground": "#f2f2f2",
"properties": {
"style": "austin",
"threshold": 0
},
"trailing_diamond": "\ue0b0",
"style": "diamond",
"template": " {{ .UserName }}@{{ .HostName }} ",
"type": "session"
},
{
"background": "#454eb8",
"foreground": "#f2f2f2",
"powerline_symbol": "\ue0b0",
"properties": {
"folder_icon": "\uf115",
"style": "full"
},
"leading_diamond": "<transparent,#454eb8>\ue0b0</>",
"trailing_diamond": "\ue0b0",
"style": "diamond",
"template": " {{ .Path }} ",
"type": "path"
},
{
"background": "#46b229",
"background_templates": [
"{{ if or (.Working.Changed) (.Staging.Changed) }}#F5EB67{{ end }}",
"{{ if gt .Ahead 0 }}#fa2f49{{ end }}",
"{{ if gt .Behind 0 }}#B765D9{{ end }}"
],
"foreground": "#193549",
"powerline_symbol": "\ue0b0",
"properties": {
"fetch_stash_count": true,
"fetch_status": true,
"fetch_upstream_icon": true
},
"style": "powerline",
"template": " {{ .HEAD }}{{ .BranchStatus }}{{ if .Working.Changed }} \uF044 {{ .Working.String }}{{ end }}{{ if and (.Working.Changed) (.Staging.Changed) }} |{{ end }}{{ if .Staging.Changed }} \uF046 {{ .Staging.String }}{{ end }} ",
"type": "git"
},
{
"background": "#49404f",
"foreground": "#ffffff",
"leading_diamond": "<transparent,#49404f>\ue0b0</>",
"properties": {
"style": "dallas",
"threshold": 0
},
"style": "diamond",
"template": " {{ .FormattedMs }}s ",
"trailing_diamond": "\ue0b0",
"type": "executiontime"
},
{
"background_templates": [
"{{ if gt .Code 0 }}#810313{{ end }}"
],
"foreground": "#ffffff",
"powerline_symbol": "\ue0b0",
"properties": {
"always_enabled": true
},
"leading_diamond": "<transparent,#810313>\ue0b0</>",
"trailing_diamond": "\ue0b0",
"style": "diamond",
"template": "{{ if gt .Code 0 }} \uf467 {{ .Code }}{{ end }} ",
"type": "exit"
}
],
"type": "prompt"
}
],
"final_space": true,
"version": 2
}
@ferrata
Copy link
Author

ferrata commented Apr 7, 2022

oh-my-posh --init --shell pwsh --config C:\utils\posh\ferrata-v2.json | Invoke-Expression

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