oh-my-posh/themes/rudolfs-dark.omp.json
Jan De Dobbeleer 28f6c19309 feat(git): replace branch properties with template
BREAKING CHANGE: this removes branch properties from the git segment
and replaces them with a single template. To migrate, use the following
guide.

*branch_max_length*

`"branch_max_length": 5` -> `"branch_template": "{{ trunc 5 .Branch }}"`

This will turn `feature/test-this-branch` into `featu`

If you want to display a truncate symbol at the end of the branch name:

`"branch_template": "{{ truncE 5 .Branch }}"`

This will turn `feature/test-this-branch` into `feat…`

*full_branch_path*

`"full_branch_path": false` -> `"branch_template": "{{ base .Branch }}"`

This will turn `feature/test-this-branch` into `test-this-branch`
2025-02-27 08:48:41 +01:00

77 lines
2.3 KiB
JSON

{
"$schema": "https://raw.githubusercontent.com/JanDeDobbeleer/oh-my-posh/main/themes/schema.json",
"blocks": [
{
"alignment": "left",
"segments": [
{
"background": "#BF231D",
"foreground": "#ffffff",
"style": "plain",
"template": " \uf0e7 ",
"type": "root"
},
{
"background": "#0A703E",
"foreground": "#ffffff",
"style": "plain",
"template": " {{ .Icon }} ",
"type": "os"
},
{
"background": "#0A703E",
"foreground": "#ffffff",
"style": "plain",
"template": "{{ .UserName }} ",
"type": "session"
},
{
"background": "#256C9D",
"foreground": "#ffffff",
"properties": {
"folder_icon": "\uf115",
"folder_separator_icon": " \ue0b1 ",
"max_depth": 2,
"style": "agnoster_short"
},
"style": "plain",
"template": " {{ .Path }} ",
"type": "path"
},
{
"background": "#256C9D",
"foreground": "#ffffff",
"properties": {
"branch_template": "{{ trunc 30 .Branch }}",
"fetch_stash_count": false,
"fetch_status": true,
"fetch_upstream_icon": true
},
"style": "plain",
"template": "[ {{ .UpstreamIcon }}{{ .HEAD }}{{if .BranchStatus }} {{ .BranchStatus }}{{ end }}{{ if .Working.Changed }} \uf044 {{ .Working.String }}{{ end }}{{ if and (.Working.Changed) (.Staging.Changed) }} |{{ end }}{{ if .Staging.Changed }} \uf046 {{ .Staging.String }}{{ end }}{{ if gt .StashCount 0 }} \ueb4b {{ .StashCount }}{{ end }} ]",
"type": "git"
},
{
"background": "#256C9D",
"foreground": "#ffffff",
"powerline_symbol": "\ue0b0",
"style": "plain",
"template": " \ue235 {{ if .Error }}{{ .Error }}{{ else }}{{ if .Venv }}{{ .Venv }} {{ end }}{{ .Full }}{{ end }} ",
"properties": {
"text": "\ue0b0"
},
"type": "python"
},
{
"foreground": "#256C9D",
"style": "plain",
"template": "\ue0b0 ",
"type": "text"
}
],
"type": "prompt"
}
],
"version": 3
}