mirror of
https://github.com/JanDeDobbeleer/oh-my-posh.git
synced 2024-11-09 20:44:03 -08:00
b0ff4b111f
Add transient prompt
156 lines
4.6 KiB
JSON
156 lines
4.6 KiB
JSON
{
|
|
"$schema": "https://raw.githubusercontent.com/JanDeDobbeleer/oh-my-posh/main/themes/schema.json",
|
|
"blocks": [
|
|
{
|
|
"alignment": "left",
|
|
"segments": [
|
|
{
|
|
"background": "#003543",
|
|
"foreground": "#fff",
|
|
"powerline_symbol": "\ue0b0",
|
|
"properties": {
|
|
"template": " {{ if .WSL }}WSL at {{ end }}{{.Icon}}",
|
|
"windows": "\uf179"
|
|
},
|
|
"style": "powerline",
|
|
"type": "os"
|
|
},
|
|
{
|
|
"background": "#003543",
|
|
"foreground": "#d2ff5e",
|
|
"powerline_symbol": "\ue0b0",
|
|
"properties": {
|
|
"template": "{{ .UserName }} "
|
|
},
|
|
"style": "powerline",
|
|
"type": "session"
|
|
},
|
|
{
|
|
"background": "#0087D8",
|
|
"foreground": "#003544",
|
|
"powerline_symbol": "\ue0b0",
|
|
"properties": {
|
|
"folder_separator_icon": "/",
|
|
"style": "full",
|
|
"template": " \ue5ff {{ .Path }} "
|
|
},
|
|
"style": "powerline",
|
|
"type": "path"
|
|
},
|
|
{
|
|
"background": "#d2ff5e",
|
|
"background_templates": [
|
|
"{{ if or (.Working.Changed) (.Staging.Changed) }}#ff9248{{ end }}",
|
|
"{{ if and (gt .Ahead 0) (gt .Behind 0) }}#f26d50{{ end }}",
|
|
"{{ if gt .Ahead 0 }}#89d1dc{{ end }}",
|
|
"{{ if gt .Behind 0 }}#f17c37{{ end }}"
|
|
],
|
|
"foreground": "#193549",
|
|
"powerline_symbol": "\ue0b0",
|
|
"properties": {
|
|
"fetch_stash_count": true,
|
|
"fetch_status": true,
|
|
"template": " {{ .HEAD }}{{ if .Staging.Changed }} \uf046 {{ .Staging.String }}{{ end }}{{ if and (.Working.Changed) (.Staging.Changed) }} |{{ end }}{{ if .Working.Changed }} \uf044 {{ .Working.String }}{{ end }}{{ if gt .StashCount 0 }} \uf692 {{ .StashCount }}{{ end }} "
|
|
},
|
|
"style": "powerline",
|
|
"type": "git"
|
|
},
|
|
{
|
|
"background": "#33DD2D",
|
|
"background_templates": [
|
|
"{{ if gt .Code 0 }}#f1184c{{ end }}"
|
|
],
|
|
"foreground": "#242424",
|
|
"powerline_symbol": "\ue0b0",
|
|
"properties": {
|
|
"always_enabled": true,
|
|
"template": " \ufc8d "
|
|
},
|
|
"style": "powerline",
|
|
"type": "exit"
|
|
}
|
|
],
|
|
"type": "prompt"
|
|
},
|
|
{
|
|
"alignment": "right",
|
|
"segments": [
|
|
{
|
|
"background": "#f36943",
|
|
"background_templates": [
|
|
"{{if eq \"Charging\" .State.String}}#33DD2D{{end}}",
|
|
"{{if eq \"Discharging\" .State.String}}#FFCD58{{end}}",
|
|
"{{if eq \"Full\" .State.String}}#0476d0{{end}}"
|
|
],
|
|
"foreground": "#242424",
|
|
"invert_powerline": true,
|
|
"powerline_symbol": "\ue0b2",
|
|
"properties": {
|
|
"template": " {{ if not .Error }}{{ .Icon }}{{ .Percentage }}{{ end }}{{ .Error }}\uf295 \uf583 "
|
|
},
|
|
"style": "powerline",
|
|
"type": "battery"
|
|
},
|
|
{
|
|
"background": "#0087D8",
|
|
"foreground": "#003544",
|
|
"invert_powerline": true,
|
|
"powerline_symbol": "\ue0b2",
|
|
"properties": {
|
|
"display_mode": "context",
|
|
"fetch_virtual_env": true,
|
|
"template": " \ue235 {{ .Venv }} "
|
|
},
|
|
"style": "powerline",
|
|
"type": "python"
|
|
},
|
|
{
|
|
"background": "#003543",
|
|
"foreground": "#fff",
|
|
"invert_powerline": true,
|
|
"powerline_symbol": "\ue0b2",
|
|
"properties": {
|
|
"template": "<#fff> \uf64f </>{{ .CurrentDate | date .Format }} "
|
|
},
|
|
"style": "powerline",
|
|
"type": "time"
|
|
}
|
|
],
|
|
"type": "prompt"
|
|
},
|
|
{
|
|
"alignment": "left",
|
|
"newline": true,
|
|
"segments": [
|
|
{
|
|
"foreground": "#FFD700",
|
|
"properties": {
|
|
"template": " \u26a1 "
|
|
},
|
|
"style": "plain",
|
|
"type": "root"
|
|
},
|
|
{
|
|
"foreground": "#f1184c",
|
|
"properties": {
|
|
"template": "🚀 "
|
|
},
|
|
"style": "plain",
|
|
"type": "text"
|
|
}
|
|
],
|
|
"type": "prompt"
|
|
}
|
|
],
|
|
"console_title": true,
|
|
"console_title_style": "template",
|
|
"console_title_template": "{{ .Shell }} in {{ .Folder }}",
|
|
"final_space": true,
|
|
"transient_prompt": {
|
|
"background": "transparent",
|
|
"foreground": "#FFD700",
|
|
"template": "{{if .Root}}\u26a1 {{end}}🚀 "
|
|
},
|
|
"version": 1
|
|
}
|