Skip to content

Instantly share code, notes, and snippets.

@Riari
Last active April 24, 2024 10:12
Show Gist options
  • Save Riari/f4f84f7b4a722f20568ea053c52753d5 to your computer and use it in GitHub Desktop.
Save Riari/f4f84f7b4a722f20568ea053c52753d5 to your computer and use it in GitHub Desktop.
{
"$schema": "https://raw.githubusercontent.com/JanDeDobbeleer/oh-my-posh/main/themes/schema.json",
"version": 2,
"final_space": true,
"console_title_template": "{{ .Shell }} in {{ .Folder }}",
"blocks": [
{
"type": "prompt",
"alignment": "left",
"segments": [
{
"type": "session",
"style": "diamond",
"foreground": "p:black",
"background": "p:orange",
"leading_diamond": "\ue0b6",
"trailing_diamond": "\ue0b0",
"template": " {{ if .SSHSession }}\udb80\udf18 {{ end }}{{ .UserName }} "
},
{
"type": "path",
"style": "powerline",
"powerline_symbol": "\ue0b0",
"foreground": "p:white",
"background": "p:gray",
"template": " \uF4D3 {{ path .Path .Location }} ",
"properties": {
"style": "folder"
}
},
{
"type": "git",
"style": "powerline",
"powerline_symbol": "\ue0b0",
"foreground": "p:black",
"foreground_templates": [
"{{ if or (.Working.Changed) (.Staging.Changed) }}p:black{{ end }}",
"{{ if and (gt .Ahead 0) (gt .Behind 0) }}p:white{{ end }}",
"{{ if gt .Ahead 0 }}p:black{{ end }}",
"{{ if gt .Behind 0 }}p:black{{ end }}"
],
"background": "p:green",
"background_templates": [
"{{ if or (.Working.Changed) (.Staging.Changed) }}p:yellow{{ end }}",
"{{ if and (gt .Ahead 0) (gt .Behind 0) }}p:red{{ end }}",
"{{ if gt .Ahead 0 }}p:orange{{ end }}",
"{{ if gt .Behind 0 }}p:purple{{ end }}"
],
"template": " {{ if .UpstreamURL }}{{ url .UpstreamIcon .UpstreamURL }} {{ end }}{{ .HEAD }}{{if .BranchStatus }} {{ .BranchStatus }}{{ end }}{{ if .Working.Changed }} \uf044 {{ .Working.String }}{{ end }}{{ if .Staging.Changed }} \uf046 {{ .Staging.String }}{{ end }} ",
"properties": {
"branch_max_length": 25,
"fetch_status": true,
"fetch_upstream_icon": true
}
},
{
"type": "root",
"style": "powerline",
"powerline_symbol": "\ue0b0",
"foreground": "p:white",
"background": "p:gray",
"template": " \uf0e7 "
},
{
"type": "status",
"style": "diamond",
"foreground": "p:black",
"background": "p:blue",
"background_templates": [
"{{ if gt .Code 0 }}p:red{{ end }}"
],
"leading_diamond": "<transparent,background>\ue0b0</>",
"trailing_diamond": "\ue0b4",
"template": " {{ if gt .Code 0 }}\uf00d{{ else }}\uf00c{{ end }} ",
"properties": {
"always_enabled": true
}
}
]
},
{
"type": "rprompt",
"segments": [
{
"type": "node",
"style": "plain",
"foreground": "p:green",
"background": "transparent",
"template": "\udb80\udf99 ",
"properties": {
"display_mode": "files",
"fetch_package_manager": false,
"home_enabled": false
}
},
{
"type": "go",
"style": "plain",
"foreground": "p:blue",
"background": "transparent",
"template": "\udb81\udfd3 ",
"properties": {
"fetch_version": false
}
},
{
"type": "python",
"style": "plain",
"foreground": "p:yellow",
"background": "transparent",
"template": "\ue235 ",
"properties": {
"display_mode": "files",
"fetch_version": false,
"fetch_virtual_env": false
}
},
{
"type": "shell",
"style": "plain",
"foreground": "p:white",
"background": "transparent",
"template": "in <p:blue><b>{{ .Name }}</b></> "
},
{
"type": "time",
"style": "plain",
"foreground": "p:white",
"background": "transparent",
"template": "at <p:blue><b>{{ .CurrentDate | date \"15:04:05\" }}</b></>"
}
]
}
],
"tooltips": [
{
"type": "aws",
"tips": [
"aws"
],
"style": "diamond",
"foreground": "p:black",
"background": "p:orange",
"leading_diamond": "\ue0b0",
"trailing_diamond": "\ue0b4",
"template": " \ue7ad {{ .Profile }}{{ if .Region }}@{{ .Region }}{{ end }} ",
"properties": {
"display_default": true
}
},
{
"type": "az",
"tips": [
"az"
],
"style": "diamond",
"foreground": "p:black",
"background": "p:blue",
"leading_diamond": "\ue0b0",
"trailing_diamond": "\ue0b4",
"template": " \ufd03 {{ .Name }} ",
"properties": {
"display_default": true
}
}
],
"transient_prompt": {
"foreground": "p:white",
"background": "transparent",
"template": "<p:gray,transparent>\ue0b6</><,p:gray> {{ .Folder }} </><p:gray,transparent>\ue0b0</> "
},
"secondary_prompt": {
"foreground": "p:white",
"background": "transparent",
"template": "<p:gray,transparent>\ue0b6</><,p:gray> > </><p:gray,transparent>\ue0b0</> "
},
"palette": {
"black": "#262B44",
"blue": "#82aaff",
"gray": "#546e7a",
"green": "#c3e88d",
"orange": "#f78c6c",
"purple": "#c792ea",
"red": "#f07178",
"white": "#eeffff",
"yellow": "#ffcb6b"
}
}
oh-my-posh init pwsh --config ~\.theme.omp.json | Invoke-Expression
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment