From a64a041c86620c6d30747087d3ad09dc52c25f77 Mon Sep 17 00:00:00 2001 From: Jan De Dobbeleer Date: Sun, 13 Mar 2022 20:24:49 +0100 Subject: [PATCH] chore: remove post- and prefix references relates to #1916 --- docs/docs/config-segment.md | 14 - src/test/jandedobbeleer-palette.omp.json | 358 +++++++++++------------ src/test/jandedobbeleer.omp.json | 290 +++++++++--------- themes/schema.json | 12 - 4 files changed, 323 insertions(+), 351 deletions(-) diff --git a/docs/docs/config-segment.md b/docs/docs/config-segment.md index f6c9f532..2142ce58 100644 --- a/docs/docs/config-segment.md +++ b/docs/docs/config-segment.md @@ -139,24 +139,10 @@ engine which allow you to customize the output even more. You can use these on any segment, the engine is responsible for adding them correctly. -- prefix: `string` -- postfix: `string` - include_folders: `[]string` - exclude_folders: `[]string` - template: `string` - A go text/template [template][templates] to render the text -#### Prefix - -The string content will be put in front of the segment's output text. Useful for symbols, text or other customizations. -If this is not set, it will be an empty space in `plain` mode. If you want to remove the space before the segment, -specify this as `''`. - -#### Postfix - -The string content will be put after the segment's output text. Useful for symbols, text or other customizations. -If this is not set, it will default to an empty space in `plain` mode. If you want to remove the space after the segment, -specify this as `''`. - #### Include / Exclude Folders Sometimes you might want to have a segment only rendered in certain folders. If `include_folders` is specified, diff --git a/src/test/jandedobbeleer-palette.omp.json b/src/test/jandedobbeleer-palette.omp.json index b2392bde..5e852b74 100644 --- a/src/test/jandedobbeleer-palette.omp.json +++ b/src/test/jandedobbeleer-palette.omp.json @@ -1,69 +1,34 @@ { - "palette": { - "session": "#C386F1", - "path": "#FF479C", - "git-foreground": "#193549", - "git": "#FFFB38", - "git-modified": "#FF9248", - "git-diverged": "#FF4500", - "git-ahead": "#B388FF", - "git-behind": "#B388FF", - "node": "#6CA35E", - "go": "#8ED1F7", - "julia": "#4063D8", - "python": "#FFDE57", - "ruby": "#AE1401", - "azfunc": "#FEAC19", - "aws-default": "#FFA400", - "aws-jan": "#F1184C", - "root": "#FFFF66", - "executiontime": "#83769C", - "exit": "#00897B", - "exit-red": "#E91E63", - "shell": "#0077C2", - "ytm": "#1BD760", - "battery": "#F36943", - "battery-charged": "#4CAF50", - "battery-charging": "#40C4FF", - "battery-discharging": "#FF5722", - "time": "#2E9599", - "white": "#FFFFFF", - "black": "#111111" - }, + "$schema": "https://raw.githubusercontent.com/JanDeDobbeleer/oh-my-posh/main/themes/schema.json", "blocks": [ { - "type": "prompt", "alignment": "left", "segments": [ { - "type": "session", - "style": "diamond", - "foreground": "p:white", "background": "p:session", - "leading_diamond": "", - "trailing_diamond": "\uE0B0", - "properties": { - "template": "{{ .UserName }}" - } - }, - { - "type": "path", - "style": "powerline", - "powerline_symbol": "\uE0B0", "foreground": "p:white", - "background": "p:path", + "leading_diamond": "\ue0b6", "properties": { - "prefix": "  ", - "home_icon": "~", - "folder_separator_icon": " \uE0b1 ", - "style": "folder" - } + "template": " {{ .UserName }} " + }, + "style": "diamond", + "trailing_diamond": "\ue0b0", + "type": "session" }, { - "type": "git", + "background": "p:path", + "foreground": "p:white", + "powerline_symbol": "\ue0b0", + "properties": { + "folder_separator_icon": " \ue0b1 ", + "home_icon": "~", + "style": "folder", + "template": " \uf74a {{ .Path }} " + }, "style": "powerline", - "powerline_symbol": "\uE0B0", - "foreground": "p:git-foreground", + "type": "path" + }, + { "background": "p:git", "background_templates": [ "{{ if or (.Working.Changed) (.Staging.Changed) }}p:git-modified{{ end }}", @@ -71,200 +36,233 @@ "{{ if gt .Ahead 0 }}p:git-ahead{{ end }}", "{{ if gt .Behind 0 }}p:git-behind{{ end }}" ], - "leading_diamond": "", - "trailing_diamond": "", + "foreground": "p:git-foreground", + "leading_diamond": "\ue0b6", + "powerline_symbol": "\ue0b0", "properties": { - "fetch_status": true, - "fetch_stash_count": true, - "fetch_upstream_icon": true, "branch_max_length": 25, - "template": "{{ .UpstreamIcon }}{{ .HEAD }}{{ .BranchStatus }}{{ 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 }} \uF692 {{ .StashCount }}{{ end }}" - } + "fetch_stash_count": true, + "fetch_status": true, + "fetch_upstream_icon": true, + "template": " {{ .UpstreamIcon }}{{ .HEAD }}{{ .BranchStatus }}{{ 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 }} \uf692 {{ .StashCount }}{{ end }} " + }, + "style": "powerline", + "trailing_diamond": "\ue0b4", + "type": "git" }, { - "type": "node", - "style": "powerline", - "powerline_symbol": "\uE0B0", - "foreground": "p:white", "background": "p:node", + "foreground": "p:white", + "powerline_symbol": "\ue0b0", "properties": { - "prefix": " \uF898 ", - "fetch_version": true - } + "fetch_version": true, + "template": " \uf898 {{ if .PackageManagerIcon }}{{ .PackageManagerIcon }} {{ end }}{{ .Full }} " + }, + "style": "powerline", + "type": "node" }, { - "type": "go", - "style": "powerline", - "powerline_symbol": "\uE0B0", - "foreground": "p:black", "background": "p:go", + "foreground": "p:black", + "powerline_symbol": "\ue0b0", "properties": { - "prefix": " \uE626 ", - "fetch_version": true - } + "fetch_version": true, + "template": " \ue626 {{ if .Error }}{{ .Error }}{{ else }}{{ .Full }}{{ end }} " + }, + "style": "powerline", + "type": "go" }, { - "type": "julia", - "style": "powerline", - "powerline_symbol": "\uE0B0", - "foreground": "p:black", "background": "p:julia", + "foreground": "p:black", + "powerline_symbol": "\ue0b0", "properties": { - "prefix": " \uE624 ", - "fetch_version": true - } + "fetch_version": true, + "template": " \ue624 {{ if .Error }}{{ .Error }}{{ else }}{{ .Full }}{{ end }} " + }, + "style": "powerline", + "type": "julia" }, { - "type": "python", - "style": "powerline", - "powerline_symbol": "\uE0B0", - "foreground": "p:black", "background": "p:python", + "foreground": "p:black", + "powerline_symbol": "\ue0b0", "properties": { - "prefix": " \uE235 ", "display_mode": "files", "fetch_virtual_env": false, - "template": "{{ if .Error }}{{ .Error }}{{ else }}{{ .Full }}{{ end }}" - } + "template": " \ue235 {{ if .Error }}{{ .Error }}{{ else }}{{ .Full }}{{ end }} " + }, + "style": "powerline", + "type": "python" }, { - "type": "ruby", - "style": "powerline", - "powerline_symbol": "\uE0B0", - "foreground": "p:white", "background": "p:ruby", + "foreground": "p:white", + "powerline_symbol": "\ue0b0", "properties": { - "prefix": " \uE791 ", + "display_mode": "files", "fetch_version": true, - "display_mode": "files" - } + "template": " \ue791 {{ if .Error }}{{ .Error }}{{ else }}{{ .Full }}{{ end }} " + }, + "style": "powerline", + "type": "ruby" }, { - "type": "azfunc", - "style": "powerline", - "powerline_symbol": "\uE0B0", - "foreground": "p:white", "background": "p:azfunc", + "foreground": "p:white", + "powerline_symbol": "\ue0b0", "properties": { - "prefix": " \uf0e7", + "display_mode": "files", "fetch_version": false, - "display_mode": "files" - } + "template": " \uf0e7{{ if .Error }}{{ .Error }}{{ else }}{{ .Full }}{{ end }} " + }, + "style": "powerline", + "type": "azfunc" }, { - "type": "aws", - "style": "powerline", - "powerline_symbol": "\uE0B0", - "foreground": "p:white", "background_templates": [ "{{if contains \"default\" .Profile}}p:aws-default{{end}}", "{{if contains \"jan\" .Profile}}p:aws-jan{{end}}" ], - "properties": { - "prefix": " \uE7AD ", - "display_default": false - } - }, - { - "type": "root", - "style": "powerline", - "powerline_symbol": "\uE0B0", - "foreground": "p:black", - "background": "p:root", - "properties": { - "template": "" - } - }, - { - "type": "executiontime", - "style": "plain", "foreground": "p:white", + "powerline_symbol": "\ue0b0", + "properties": { + "display_default": false, + "template": " \ue7ad {{ .Profile }}{{ if .Region }}@{{ .Region }}{{ end }} " + }, + "style": "powerline", + "type": "aws" + }, + { + "background": "p:root", + "foreground": "p:black", + "powerline_symbol": "\ue0b0", + "properties": { + "template": " \uf0ad " + }, + "style": "powerline", + "type": "root" + }, + { "background": "p:executiontime", - "leading_diamond": "", - "trailing_diamond": "", + "foreground": "p:white", "properties": { "always_enabled": true, - "prefix": "\uE0B0 \ufbab", - "postfix": "\u2800" - } + "template": "\ue0b0 \ufbab{{ .FormattedMs }}\u2800" + }, + "style": "plain", + "type": "executiontime" }, { - "type": "exit", - "style": "diamond", - "foreground": "p:white", "background": "p:exit", "background_templates": [ "{{ if gt .Code 0 }}p:exit-red{{ end }}" ], - "leading_diamond": "", - "trailing_diamond": "\uE0B4", + "foreground": "p:white", "properties": { "always_enabled": true, - "template": "\uE23A", - "prefix": "\uE0B0 " - } + "template": "\ue0b0 \ue23a " + }, + "style": "diamond", + "trailing_diamond": "\ue0b4", + "type": "exit" } - ] + ], + "type": "prompt" }, { - "type": "rprompt", "segments": [ { - "type": "shell", - "style": "plain", - "foreground": "p:white", "background": "p:shell", - "properties": { - "prefix": "<#0077c2,transparent>\uE0B6  ", - "postfix": " \uE0B2" - } - }, - { - "type": "ytm", - "style": "powerline", - "powerline_symbol": "\uE0B2", - "invert_powerline": true, - "foreground": "p:black", - "background": "p:ytm", - "properties": { - "prefix": " \uF167 ", - "paused_icon": " ", - "playing_icon": " " - } - }, - { - "type": "battery", - "style": "powerline", - "invert_powerline": true, - "powerline_symbol": "\uE0B2", "foreground": "p:white", + "properties": { + "template": "<#0077c2,transparent>\ue0b6 \uf489 {{ .Name }} \ue0b2" + }, + "style": "plain", + "type": "shell" + }, + { + "background": "p:ytm", + "foreground": "p:black", + "invert_powerline": true, + "powerline_symbol": "\ue0b2", + "properties": { + "paused_icon": "\uf04c ", + "playing_icon": "\uf04b ", + "template": " \uf167 {{ .Icon }}{{ if ne .Status \"stopped\" }}{{ .Artist }} - {{ .Track }}{{ end }} " + }, + "style": "powerline", + "type": "ytm" + }, + { "background": "p:battery", "background_templates": [ "{{if eq \"Charging\" .State.String}}p:battery-charging{{end}}", "{{if eq \"Discharging\" .State.String}}p:battery-discharging{{end}}", "{{if eq \"Full\" .State.String}}p:battery-charged{{end}}" ], + "foreground": "p:white", + "invert_powerline": true, + "powerline_symbol": "\ue0b2", "properties": { - "discharging_icon": " ", - "charging_icon": " ", - "charged_icon": " ", - "postfix": " " - } + "charged_icon": "\ue22f ", + "charging_icon": "\ue234 ", + "discharging_icon": "\ue231 ", + "template": " {{ if not .Error }}{{ .Icon }}{{ .Percentage }}{{ end }}{{ .Error }}\uf295 " + }, + "style": "powerline", + "type": "battery" }, { - "type": "time", - "style": "diamond", - "invert_powerline": true, - "leading_diamond": "\uE0B2", - "trailing_diamond": "\uE0B4", "background": "p:time", - "foreground": "p:black" + "foreground": "p:black", + "invert_powerline": true, + "leading_diamond": "\ue0b2", + "properties": { + "template": " {{ .CurrentDate | date .Format }} " + }, + "style": "diamond", + "trailing_diamond": "\ue0b4", + "type": "time" } - ] + ], + "type": "rprompt" } ], - "final_space": true, "console_title": true, "console_title_style": "template", - "console_title_template": "{{ .Shell }} in {{ .Folder }}" + "console_title_template": "{{ .Shell }} in {{ .Folder }}", + "final_space": true, + "palette": { + "aws-default": "#FFA400", + "aws-jan": "#F1184C", + "azfunc": "#FEAC19", + "battery": "#F36943", + "battery-charged": "#4CAF50", + "battery-charging": "#40C4FF", + "battery-discharging": "#FF5722", + "black": "#111111", + "executiontime": "#83769C", + "exit": "#00897B", + "exit-red": "#E91E63", + "git": "#FFFB38", + "git-ahead": "#B388FF", + "git-behind": "#B388FF", + "git-diverged": "#FF4500", + "git-foreground": "#193549", + "git-modified": "#FF9248", + "go": "#8ED1F7", + "julia": "#4063D8", + "node": "#6CA35E", + "path": "#FF479C", + "python": "#FFDE57", + "root": "#FFFF66", + "ruby": "#AE1401", + "session": "#C386F1", + "shell": "#0077C2", + "time": "#2E9599", + "white": "#FFFFFF", + "ytm": "#1BD760" + }, + "version": 1 } diff --git a/src/test/jandedobbeleer.omp.json b/src/test/jandedobbeleer.omp.json index af5a3ef7..3b84c0b7 100644 --- a/src/test/jandedobbeleer.omp.json +++ b/src/test/jandedobbeleer.omp.json @@ -1,38 +1,34 @@ { + "$schema": "https://raw.githubusercontent.com/JanDeDobbeleer/oh-my-posh/main/themes/schema.json", "blocks": [ { - "type": "prompt", "alignment": "left", "segments": [ { - "type": "session", - "style": "diamond", - "foreground": "#ffffff", "background": "#c386f1", - "leading_diamond": "", - "trailing_diamond": "\uE0B0", - "properties": { - "template": "{{ .UserName }}" - } - }, - { - "type": "path", - "style": "powerline", - "powerline_symbol": "\uE0B0", "foreground": "#ffffff", - "background": "#ff479c", + "leading_diamond": "\ue0b6", "properties": { - "prefix": "  ", - "home_icon": "~", - "folder_separator_icon": " \uE0b1 ", - "style": "folder" - } + "template": " {{ .UserName }} " + }, + "style": "diamond", + "trailing_diamond": "\ue0b0", + "type": "session" }, { - "type": "git", + "background": "#ff479c", + "foreground": "#ffffff", + "powerline_symbol": "\ue0b0", + "properties": { + "folder_separator_icon": " \ue0b1 ", + "home_icon": "~", + "style": "folder", + "template": " \uf74a {{ .Path }} " + }, "style": "powerline", - "powerline_symbol": "\uE0B0", - "foreground": "#193549", + "type": "path" + }, + { "background": "#fffb38", "background_templates": [ "{{ if or (.Working.Changed) (.Staging.Changed) }}#FF9248{{ end }}", @@ -40,198 +36,202 @@ "{{ if gt .Ahead 0 }}#B388FF{{ end }}", "{{ if gt .Behind 0 }}#B388FF{{ end }}" ], - "leading_diamond": "", - "trailing_diamond": "", + "foreground": "#193549", + "leading_diamond": "\ue0b6", + "powerline_symbol": "\ue0b0", "properties": { - "fetch_status": true, - "fetch_stash_count": true, - "fetch_upstream_icon": true, "branch_max_length": 25, - "template": "{{ .UpstreamIcon }}{{ .HEAD }}{{ .BranchStatus }}{{ 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 }} \uF692 {{ .StashCount }}{{ end }}" - } + "fetch_stash_count": true, + "fetch_status": true, + "fetch_upstream_icon": true, + "template": " {{ .UpstreamIcon }}{{ .HEAD }}{{ .BranchStatus }}{{ 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 }} \uf692 {{ .StashCount }}{{ end }} " + }, + "style": "powerline", + "trailing_diamond": "\ue0b4", + "type": "git" }, { - "type": "node", - "style": "powerline", - "powerline_symbol": "\uE0B0", - "foreground": "#ffffff", "background": "#6CA35E", + "foreground": "#ffffff", + "powerline_symbol": "\ue0b0", "properties": { - "prefix": " \uF898 ", - "fetch_version": true - } + "fetch_version": true, + "template": " \uf898 {{ if .PackageManagerIcon }}{{ .PackageManagerIcon }} {{ end }}{{ .Full }} " + }, + "style": "powerline", + "type": "node" }, { - "type": "go", - "style": "powerline", - "powerline_symbol": "\uE0B0", - "foreground": "#111111", "background": "#8ED1F7", + "foreground": "#111111", + "powerline_symbol": "\ue0b0", "properties": { - "prefix": " \uE626 ", - "fetch_version": true - } + "fetch_version": true, + "template": " \ue626 {{ if .Error }}{{ .Error }}{{ else }}{{ .Full }}{{ end }} " + }, + "style": "powerline", + "type": "go" }, { - "type": "julia", - "style": "powerline", - "powerline_symbol": "\uE0B0", - "foreground": "#111111", "background": "#4063D8", + "foreground": "#111111", + "powerline_symbol": "\ue0b0", "properties": { - "prefix": " \uE624 ", - "fetch_version": true - } + "fetch_version": true, + "template": " \ue624 {{ if .Error }}{{ .Error }}{{ else }}{{ .Full }}{{ end }} " + }, + "style": "powerline", + "type": "julia" }, { - "type": "python", - "style": "powerline", - "powerline_symbol": "\uE0B0", - "foreground": "#111111", "background": "#FFDE57", + "foreground": "#111111", + "powerline_symbol": "\ue0b0", "properties": { - "prefix": " \uE235 ", "display_mode": "files", "fetch_virtual_env": false, - "template": "{{ if .Error }}{{ .Error }}{{ else }}{{ .Full }}{{ end }}" - } + "template": " \ue235 {{ if .Error }}{{ .Error }}{{ else }}{{ .Full }}{{ end }} " + }, + "style": "powerline", + "type": "python" }, { - "type": "ruby", - "style": "powerline", - "powerline_symbol": "\uE0B0", - "foreground": "#ffffff", "background": "#AE1401", + "foreground": "#ffffff", + "powerline_symbol": "\ue0b0", "properties": { - "prefix": " \uE791 ", + "display_mode": "files", "fetch_version": true, - "display_mode": "files" - } + "template": " \ue791 {{ if .Error }}{{ .Error }}{{ else }}{{ .Full }}{{ end }} " + }, + "style": "powerline", + "type": "ruby" }, { - "type": "azfunc", - "style": "powerline", - "powerline_symbol": "\uE0B0", - "foreground": "#ffffff", "background": "#FEAC19", + "foreground": "#ffffff", + "powerline_symbol": "\ue0b0", "properties": { - "prefix": " \uf0e7", + "display_mode": "files", "fetch_version": false, - "display_mode": "files" - } + "template": " \uf0e7{{ if .Error }}{{ .Error }}{{ else }}{{ .Full }}{{ end }} " + }, + "style": "powerline", + "type": "azfunc" }, { - "type": "aws", - "style": "powerline", - "powerline_symbol": "\uE0B0", - "foreground": "#ffffff", "background_templates": [ "{{if contains \"default\" .Profile}}#FFA400{{end}}", "{{if contains \"jan\" .Profile}}#f1184c{{end}}" ], + "foreground": "#ffffff", + "powerline_symbol": "\ue0b0", "properties": { - "prefix": " \uE7AD ", - "display_default": false - } - }, - { - "type": "root", + "display_default": false, + "template": " \ue7ad {{ .Profile }}{{ if .Region }}@{{ .Region }}{{ end }} " + }, "style": "powerline", - "powerline_symbol": "\uE0B0", - "foreground": "#111111", + "type": "aws" + }, + { "background": "#ffff66", + "foreground": "#111111", + "powerline_symbol": "\ue0b0", "properties": { - "template": "" - } + "template": " \uf0ad " + }, + "style": "powerline", + "type": "root" }, { - "type": "executiontime", - "style": "plain", - "foreground": "#ffffff", "background": "#83769c", - "leading_diamond": "", - "trailing_diamond": "", + "foreground": "#ffffff", "properties": { "always_enabled": true, - "prefix": "\uE0B0 \ufbab", - "postfix": "\u2800" - } + "template": "\ue0b0 \ufbab{{ .FormattedMs }}\u2800" + }, + "style": "plain", + "type": "executiontime" }, { - "type": "exit", - "style": "diamond", - "foreground": "#ffffff", "background": "#00897b", - "background_templates": ["{{ if gt .Code 0 }}#e91e63{{ end }}"], - "leading_diamond": "", - "trailing_diamond": "\uE0B4", + "background_templates": [ + "{{ if gt .Code 0 }}#e91e63{{ end }}" + ], + "foreground": "#ffffff", "properties": { "always_enabled": true, - "template": "\uE23A", - "prefix": "\uE0B0 " - } + "template": "\ue0b0 \ue23a " + }, + "style": "diamond", + "trailing_diamond": "\ue0b4", + "type": "exit" } - ] + ], + "type": "prompt" }, { - "type": "rprompt", "segments": [ { - "type": "shell", - "style": "plain", - "foreground": "#ffffff", "background": "#0077c2", - "properties": { - "prefix": "<#0077c2,transparent>\uE0B6  ", - "postfix": " \uE0B2" - } - }, - { - "type": "ytm", - "style": "powerline", - "powerline_symbol": "\uE0B2", - "invert_powerline": true, - "foreground": "#111111", - "background": "#1BD760", - "properties": { - "prefix": " \uF167 ", - "paused_icon": " ", - "playing_icon": " " - } - }, - { - "type": "battery", - "style": "powerline", - "invert_powerline": true, - "powerline_symbol": "\uE0B2", "foreground": "#ffffff", + "properties": { + "template": "<#0077c2,transparent>\ue0b6 \uf489 {{ .Name }} \ue0b2" + }, + "style": "plain", + "type": "shell" + }, + { + "background": "#1BD760", + "foreground": "#111111", + "invert_powerline": true, + "powerline_symbol": "\ue0b2", + "properties": { + "paused_icon": "\uf04c ", + "playing_icon": "\uf04b ", + "template": " \uf167 {{ .Icon }}{{ if ne .Status \"stopped\" }}{{ .Artist }} - {{ .Track }}{{ end }} " + }, + "style": "powerline", + "type": "ytm" + }, + { "background": "#f36943", "background_templates": [ "{{if eq \"Charging\" .State.String}}#40c4ff{{end}}", "{{if eq \"Discharging\" .State.String}}#ff5722{{end}}", "{{if eq \"Full\" .State.String}}#4caf50{{end}}" ], + "foreground": "#ffffff", + "invert_powerline": true, + "powerline_symbol": "\ue0b2", "properties": { - "discharging_icon": " ", - "charging_icon": " ", - "charged_icon": " ", - "postfix": " " - } + "charged_icon": "\ue22f ", + "charging_icon": "\ue234 ", + "discharging_icon": "\ue231 ", + "template": " {{ if not .Error }}{{ .Icon }}{{ .Percentage }}{{ end }}{{ .Error }}\uf295 " + }, + "style": "powerline", + "type": "battery" }, { - "type": "time", - "style": "diamond", - "invert_powerline": true, - "leading_diamond": "\uE0B2", - "trailing_diamond": "\uE0B4", "background": "#2e9599", - "foreground": "#111111" + "foreground": "#111111", + "invert_powerline": true, + "leading_diamond": "\ue0b2", + "properties": { + "template": " {{ .CurrentDate | date .Format }} " + }, + "style": "diamond", + "trailing_diamond": "\ue0b4", + "type": "time" } - ] + ], + "type": "rprompt" } ], - "final_space": true, "console_title": true, "console_title_style": "template", - "console_title_template": "{{ .Shell }} in {{ .Folder }}" + "console_title_template": "{{ .Shell }} in {{ .Folder }}", + "final_space": true, + "version": 1 } diff --git a/themes/schema.json b/themes/schema.json index c87a3aac..6953e5e6 100644 --- a/themes/schema.json +++ b/themes/schema.json @@ -219,18 +219,6 @@ "description": "https://ohmyposh.dev/docs/config-overview#properties", "default": {}, "properties": { - "prefix": { - "type": "string", - "title": "Text prefix", - "description": "https://ohmyposh.dev/docs/config-overview#prefix", - "default": " " - }, - "postfix": { - "type": "string", - "title": "Text postfix", - "description": "https://ohmyposh.dev/docs/config-overview#postfix", - "default": " " - }, "template": { "$ref": "#/definitions/template" },