JanDeDobbeleer / oh-my-posh

The most customisable and low-latency cross platform/shell prompt renderer
https://ohmyposh.dev
MIT License
17.02k stars 2.37k forks source link

oh-my-posh proactively forces changes to the theme configuration file #2441

Closed aaronecgberht closed 2 years ago

aaronecgberht commented 2 years ago

Code of Conduct

What happened?

oh-my-posh forces changes to my theme profile

Theme

{ "final_space": true, "console_title": true, "console_title_style": "folder", "blocks": [ { "type": "prompt", "alignment": "left", "horizontal_offset": 0, "vertical_offset": 0, "segments": [ { "type": "path", "style": "diamond", "powerline_symbol": "", "invert_powerline": false, "foreground": "#ffffff", "background": "#ff479c", "leading_diamond": "", "trailing_diamond": "", "properties": { "prefix": "  ", "style": "folder" } }, { "type": "git", "style": "powerline", "powerline_symbol": "", "invert_powerline": false, "foreground": "#193549", "background": "#fffb38", "leading_diamond": "", "trailing_diamond": "", "properties": { "display_status": true, "display_stash_count": true, "display_upstream_icon": true } }, { "type": "dotnet", "style": "powerline", "powerline_symbol": "", "invert_powerline": false, "foreground": "#ffffff", "background": "#6CA35E", "leading_diamond": "", "trailing_diamond": "", "properties": { "display_version": true, "prefix": "  " } }, { "type": "root", "style": "powerline", "powerline_symbol": "", "invert_powerline": false, "foreground": "#ffffff", "background": "#ffff66", "leading_diamond": "", "trailing_diamond": "", "properties": null }, { "type": "exit", "style": "powerline", "powerline_symbol": "", "invert_powerline": false, "foreground": "#ffffff", "background": "#2e9599", "leading_diamond": "", "trailing_diamond": "", "properties": { "always_enabled": true, "color_background": true, "display_exit_code": false, "error_color": "#f1184c", "prefix": " " } } ] } ] }

What OS are you seeing the problem on?

Windows

Which shell are you using?

powershell

Log output

oh-my-posh debug

Version: 8.6.2

Segments:

ConsoleTitle(false) -   0 ms -
path(true)    -   0 ms -   ~ 
git(false)    -   4 ms -
dotnet(false) -   0 ms -
root(true)    -   0 ms -  
exit(true)    -   0 ms -  

Run duration: 18.7247ms

Cache path: C:\Users\Administrator\AppData\Local\oh-my-posh

Config path: C:\Github\Prompt\ohmyposhv3-v2.json

Logs:

2022/06/26 20:59:37 debug: Getenv
C:\Users\Administrator\AppData\Local
2022/06/26 20:59:37 Getenv duration: 0s, args: LOCALAPPDATA
2022/06/26 20:59:37 CachePath duration: 0s, args:
2022/06/26 20:59:37 debug: Getenv
C:\Github\Prompt\ohmyposhv3-v2.json
2022/06/26 20:59:37 Getenv duration: 0s, args: POSH_THEME
2022/06/26 20:59:37 Shell duration: 10.1476ms, args:
2022/06/26 20:59:37 resolveConfigPath duration: 10.1476ms, args:
2022/06/26 20:59:37 Init duration: 11.1449ms, args:
2022/06/26 20:59:37 Flags duration: 0s, args:
2022/06/26 20:59:37 config.loadConfig duration: 489.8µs, args:
2022/06/26 20:59:37 Flags duration: 0s, args:
2022/06/26 20:59:37 debug: Getenv

2022/06/26 20:59:37 Getenv duration: 0s, args: OMP_CACHE_DISABLED
2022/06/26 20:59:37 WindowsRegistryKeyValue duration: 0s, args: HKEY_CURRENT_USER\Software\Microsoft\Windows\DWM\ColorizationColor
2022/06/26 20:59:37 PathSeparator duration: 0s, args:
2022/06/26 20:59:37 PathSeparator duration: 0s, args:
2022/06/26 20:59:37 PathSeparator duration: 0s, args:
2022/06/26 20:59:37 PathSeparator duration: 0s, args:
2022/06/26 20:59:37 PathSeparator duration: 0s, args:
2022/06/26 20:59:37 PathSeparator duration: 0s, args:
2022/06/26 20:59:37 PathSeparator duration: 0s, args:
2022/06/26 20:59:37 PathSeparator duration: 0s, args:
2022/06/26 20:59:37 PathSeparator duration: 0s, args:
2022/06/26 20:59:37 PathSeparator duration: 0s, args:
2022/06/26 20:59:37 PathSeparator duration: 0s, args:
2022/06/26 20:59:37 PathSeparator duration: 0s, args:
2022/06/26 20:59:37 PathSeparator duration: 0s, args:
2022/06/26 20:59:37 PathSeparator duration: 0s, args:
2022/06/26 20:59:37 PathSeparator duration: 0s, args:
2022/06/26 20:59:37 PathSeparator duration: 0s, args:
2022/06/26 20:59:37 PathSeparator duration: 0s, args:
2022/06/26 20:59:37 PathSeparator duration: 0s, args:
2022/06/26 20:59:37 PathSeparator duration: 0s, args:
2022/06/26 20:59:37 debug: WindowsRegistryKeyValue
ColorizationColor(DWORD): 0xC40078D4
2022/06/26 20:59:37 Root duration: 0s, args:
2022/06/26 20:59:37 Shell duration: 0s, args:
2022/06/26 20:59:37 ErrorCode duration: 0s, args:
2022/06/26 20:59:37 IsWsl duration: 0s, args:
2022/06/26 20:59:37 debug: Pwd
C:\Users\Administrator
2022/06/26 20:59:37 Pwd duration: 0s, args:
2022/06/26 20:59:37 debug: Home
C:\Users\Administrator
2022/06/26 20:59:37 PathSeparator duration: 0s, args:
2022/06/26 20:59:37 PathSeparator duration: 0s, args:
2022/06/26 20:59:37 debug: User
Administrator
2022/06/26 20:59:37 User duration: 0s, args:
2022/06/26 20:59:37 debug: Host
DESKTOP-ICDRVJ0
2022/06/26 20:59:37 Host duration: 0s, args:
2022/06/26 20:59:37 GOOS duration: 0s, args:
2022/06/26 20:59:37 TemplateCache duration: 0s, args:
2022/06/26 20:59:37 Flags duration: 0s, args:
2022/06/26 20:59:37 debug: Pwd
C:\Users\Administrator
2022/06/26 20:59:37 Pwd duration: 0s, args:
2022/06/26 20:59:37 debug: Home
C:\Users\Administrator
2022/06/26 20:59:37 GOOS duration: 0s, args:
2022/06/26 20:59:37 debug: Pwd
C:\Users\Administrator
2022/06/26 20:59:37 Pwd duration: 0s, args:
2022/06/26 20:59:37 Flags duration: 0s, args:
2022/06/26 20:59:37 debug: Pwd
C:\Users\Administrator
2022/06/26 20:59:37 Pwd duration: 0s, args:
2022/06/26 20:59:37 debug: Home
C:\Users\Administrator
2022/06/26 20:59:37 GOOS duration: 0s, args:
2022/06/26 20:59:37 GOOS duration: 0s, args:
2022/06/26 20:59:37 PathSeparator duration: 0s, args:
2022/06/26 20:59:37 PathSeparator duration: 0s, args:
2022/06/26 20:59:37 PathSeparator duration: 0s, args:
2022/06/26 20:59:37 PathSeparator duration: 0s, args:
2022/06/26 20:59:37 GOOS duration: 0s, args:
2022/06/26 20:59:37 IsWsl duration: 0s, args:
2022/06/26 20:59:37 StackCount duration: 0s, args:
2022/06/26 20:59:37 DirIsWritable duration: 0s, args:
2022/06/26 20:59:37 TemplateCache duration: 0s, args:
2022/06/26 20:59:37 TemplateCache duration: 0s, args:
2022/06/26 20:59:37 Shell duration: 0s, args:
2022/06/26 20:59:37 debug: Pwd
C:\Users\Administrator
2022/06/26 20:59:37 Pwd duration: 0s, args:
2022/06/26 20:59:37 debug: Home
C:\Users\Administrator
2022/06/26 20:59:37 GOOS duration: 0s, args:
2022/06/26 20:59:37 GOOS duration: 0s, args:
2022/06/26 20:59:37 HasCommand duration: 4.3094ms, args: git.exe
2022/06/26 20:59:37 debug: Pwd
C:\Users\Administrator
2022/06/26 20:59:37 Pwd duration: 0s, args:
2022/06/26 20:59:37 error: HasParentFilePath
CreateFile C:\.git: The system cannot find the file specified.
2022/06/26 20:59:37 HasParentFilePath duration: 0s, args: .git
2022/06/26 20:59:37 debug: Pwd
C:\Users\Administrator
2022/06/26 20:59:37 Pwd duration: 0s, args:
2022/06/26 20:59:37 debug: Home
C:\Users\Administrator
2022/06/26 20:59:37 GOOS duration: 0s, args:
2022/06/26 20:59:37 debug: Pwd
C:\Users\Administrator
2022/06/26 20:59:37 Pwd duration: 0s, args:
2022/06/26 20:59:37 debug: Home
C:\Users\Administrator
2022/06/26 20:59:37 debug: Pwd
C:\Users\Administrator
2022/06/26 20:59:37 Pwd duration: 0s, args:
2022/06/26 20:59:37 debug: Home
C:\Users\Administrator
2022/06/26 20:59:37 GOOS duration: 0s, args:
2022/06/26 20:59:37 Root duration: 0s, args:
2022/06/26 20:59:37 TemplateCache duration: 0s, args:
2022/06/26 20:59:37 TemplateCache duration: 0s, args:
2022/06/26 20:59:37 Shell duration: 0s, args:
2022/06/26 20:59:37 debug: Pwd
C:\Users\Administrator
2022/06/26 20:59:37 Pwd duration: 0s, args:
2022/06/26 20:59:37 debug: Home
C:\Users\Administrator
2022/06/26 20:59:37 GOOS duration: 0s, args:
2022/06/26 20:59:37 ErrorCode duration: 0s, args:
2022/06/26 20:59:37 TemplateCache duration: 0s, args:
2022/06/26 20:59:37 TemplateCache duration: 0s, args:
2022/06/26 20:59:37 Shell duration: 0s, args:
2022/06/26 20:59:37 TemplateCache duration: 0s, args:
2022/06/26 20:59:37 debug: Getenv
C:\Users\Administrator\AppData\Local
2022/06/26 20:59:37 Getenv duration: 0s, args: LOCALAPPDATA
2022/06/26 20:59:37 CachePath duration: 0s, args:
2022/06/26 20:59:37 Flags duration: 0s, args:
aaronecgberht commented 2 years ago

Forced modification of the theme configuration file


{ "$schema": "https://raw.githubusercontent.com/JanDeDobbeleer/oh-my-posh/main/themes/schema.json", "blocks": [ { "alignment": "left", "segments": [ { "background": "#ff479c", "foreground": "#ffffff", "leading_diamond": "\ue0b6", "powerline_symbol": "\ue0b0", "properties": { "style": "folder" }, "style": "diamond", "template": " \ue5ff {{ .Path }} ", "trailing_diamond": "\ue0b0", "type": "path" }, { "background": "#fffb38", "foreground": "#193549", "powerline_symbol": "\ue0b0", "properties": { "fetch_stash_count": true, "fetch_status": true, "fetch_upstream_icon": true }, "style": "powerline", "template": " {{ .HEAD }} {{ .BranchStatus }}{{ if .Working.Changed }} \uf044 {{ .Working.String }}{{ end }}{{ if and (.Staging.Changed) (.Working.Changed) }} |{{ end }}{{ if .Staging.Changed }} \uf046 {{ .Staging.String }}{{ end }}{{ if gt .StashCount 0}} \uf692 {{ .StashCount }}{{ end }}{{ if gt .WorktreeCount 0}} \uf1bb {{ .WorktreeCount }}{{ end }} ", "type": "git" }, { "background": "#6CA35E", "foreground": "#ffffff", "powerline_symbol": "\ue0b0", "properties": { "fetch_version": true }, "style": "powerline", "template": " \ue70c {{ if .Unsupported }}\uf071{{ else }}{{ .Full }}{{ end }} ", "type": "dotnet" }, { "background": "#ffff66", "foreground": "#ffffff", "powerline_symbol": "\ue0b0", "style": "powerline", "template": " \uf0e7 ", "type": "root" }, { "background": "#2e9599", "background_templates": [ "{{ if gt .Code 0 }}#f1184c{{ end }}" ], "foreground": "#ffffff", "powerline_symbol": "\ue0b0", "properties": { "always_enabled": true }, "style": "powerline", "template": " \ue23a{{ if gt .Code 0 }}\uf00d{{ else }}\uf42e{{ end }} ", "trailing_diamond": "\ue0b4", "type": "exit" } ], "type": "prompt" } ], "final_space": true, "version": 2 }

JanDeDobbeleer commented 2 years ago

@aaronecgberht you need a version property set to 2 in the config. Otherwise it will migrate. That's by design.

github-actions[bot] commented 8 months ago

This issue has been automatically locked since there has not been any recent activity (i.e. last half year) after it was closed. It helps our maintainers focus on the active issues. If you have found a problem that seems similar, please open a discussion first, complete the body with all the details necessary to reproduce, and mention this issue as reference.