Skip to content

Instantly share code, notes, and snippets.

@brunocmorais
Last active May 8, 2023 15:00
Show Gist options
  • Select an option

  • Save brunocmorais/d1f0c12c3205430cba3dbb9dc02f9eac to your computer and use it in GitHub Desktop.

Select an option

Save brunocmorais/d1f0c12c3205430cba3dbb9dc02f9eac 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": false,
"console_title_template": "{{ .UserName }}@{{ .HostName }}: {{ .PWD }}",
"blocks": [
{
"type": "prompt",
"alignment": "left",
"segments": [
{
"type": "os",
"style": "powerline",
"foreground": "p:black",
"background": "p:yellow",
"powerline_symbol": "\ue0b2",
"invert_powerline": true,
"template": " {{ .Icon }} {{ .UserName }}@{{ .HostName }} "
},
{
"type": "path",
"style": "powerline",
"powerline_symbol": "\ue0b0",
"foreground": "p:white",
"background": "p:red",
"template": " \udb80\ude4b {{ 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:white{{ end }}"
],
"background": "p:green",
"background_templates": [
"{{ if or (.Working.Changed) (.Staging.Changed) }}p:git-working-changes{{ end }}",
"{{ if and (gt .Ahead 0) (gt .Behind 0) }}p:git-ahead-and-behind{{ end }}",
"{{ if gt .Ahead 0 }}p:git-ahead{{ end }}",
"{{ if gt .Behind 0 }}p:git-behind{{ 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,
"github_icon": "\uf7a3"
}
},
{
"type": "root",
"style": "powerline",
"powerline_symbol": "\ue0b0",
"foreground": "p:black",
"background": "p:orange",
"template": " \uf0e7 "
}
]
},
{
"type": "rprompt",
"segments": [
{
"type": "exit",
"style": "powerline",
"foreground": "p:white",
"background": "p:green",
"background_templates": [
"{{ if gt .Code 0 }}p:red{{ end }}"
],
"invert_powerline": true,
"powerline_symbol": "\ue0b2",
"template": " {{ if gt .Code 0 }}\u2717{{ else }}\u2713{{ end }} ",
"properties": {
"always_enabled": true
}
},
{
"background": "p:blue",
"foreground": "p:white",
"invert_powerline": false,
"powerline_symbol": "\ue0b0",
"style": "powerline",
"template": " \u23f2 {{ .CurrentDate | date .Format }} ",
"type": "time",
"properties": {
"time_format": "15:04"
}
}
]
}
],
"palette": {
"black": "#000000",
"blue": "#3060ff",
"green": "#04be71",
"orange": "#F07623",
"red": "#bb2424",
"white": "#ffffff",
"yellow": "#f0f335",
"git-ahead": "#49416D",
"git-behind": "#7A306C",
"git-ahead-and-behind": "#5a0606",
"git-working-changes": "#8cf2ff"
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment