Skip to content

Instantly share code, notes, and snippets.

@m-hayabusa
Last active November 20, 2023 10:59
Show Gist options
  • Save m-hayabusa/960711b6e2d4797f54d625e56c6a31f7 to your computer and use it in GitHub Desktop.
Save m-hayabusa/960711b6e2d4797f54d625e56c6a31f7 to your computer and use it in GitHub Desktop.
my oh-my-posh theme
{
"$schema": "https://raw.githubusercontent.com/JanDeDobbeleer/oh-my-posh/main/themes/schema.json",
"blocks": [
{
"alignment": "left",
"segments": [
{
"type": "shell",
"style": "plain",
"foreground": "white",
"background": "blue",
"template": " {{ replaceP `\\..*` .Version \"\" }} "
},
{
"foreground": "white",
"background": "black",
"template": " {{ .UserName }}@{{ .HostName }} ",
"type": "session",
"style": "plain"
},
{
"background": "lightBlue",
"foreground": "black",
"properties": {
"style": "agnoster_full",
"mapped_locations": {
"\\\\wsl.localhost\\Ubuntu": "\ue73a"
}
},
"template": "<u> {{ path .Path .Location }} ",
"type": "path",
"style": "plain"
},
{
"type": "git",
"style": "plain",
"foreground": "black",
"background": "lightCyan",
"background_templates": [
"{{ if or (.Working.Changed) (.Staging.Changed) }}lightCyan{{ end }}",
"{{ if and (gt .Ahead 0) (gt .Behind 0) }}lightYellow{{ end }}",
"{{ if gt .Ahead 0 }}lightGreen{{ end }}",
"{{ if gt .Behind 0 }}lightRed{{ end }}"
],
"template": "<u> {{ .HEAD }}{{ if or (.Working.Changed) (.Staging.Changed) }}+{{ end }} </u>",
"properties": {
"fetch_status": true
}
},
{
"foreground": "darkGray",
"template": "{{if .Root}}<red><b> # </b></red>{{else}} $ {{end}}",
"type": "text",
"style": "plain"
}
],
"type": "prompt"
}
],
"secondary_prompt": {
"foreground": "darkGray"
},
"version": 2
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment