Add a new segment when extending a theme #6831
Unanswered
Sebi11
asked this question in
Troubleshoot
Replies: 1 comment 2 replies
-
|
@Sebi11 this isn't supported, but I can make it work. Adding isn't an issue per se. |
Beta Was this translation helpful? Give feedback.
2 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Hi! First of all, thank you for the work on this amazing project!
Despite reading the doc of "extends", I cant help myself adding a new segment to an existing theme. Here is my custom theme right now:
{ "$schema": "https://raw.githubusercontent.com/JanDeDobbeleer/oh-my-posh/main/themes/schema.json", "extends": "powerlevel10k_rainbow", "upgrade": { "notice": true }, "blocks": [ { "type": "prompt", "alignment": "left", "segments": [ { "type": "os", "template": " {{ if .WSL }}WSL at {{ end }}{{.Icon}} {{ if .Env.CONTAINER_ID }} in \uED95 {{ .Env.CONTAINER_ID }}{{ end }} " }, { "type": "path" }, { "type": "git" }, { "type": "text", "style": "plain", "foreground": "#3069de", "template": " Hello World " } ] } ] }Modifying the segment with
"type": "os"is working fine, so I guess there's no issue with my extension.I tried adding
"index": 4to the last segment, without success sadly.For the record, here is the theme I'm extending: https://github.com/JanDeDobbeleer/oh-my-posh/blob/main/themes/powerlevel10k_rainbow.omp.json
Could you help me please?
Beta Was this translation helpful? Give feedback.
All reactions