mirror of
https://github.com/JanDeDobbeleer/oh-my-posh.git
synced 2024-11-10 04:54:03 -08:00
docs: remove pre/postfix references
This commit is contained in:
parent
a091e5c387
commit
b9b789b513
|
@ -36,19 +36,19 @@ If you want `prefix` to print a colored bracket that isn't the same as the segme
|
|||
do so like this:
|
||||
|
||||
```json
|
||||
"prefix": "<#CB4B16>┏[</>",
|
||||
"template": "<#CB4B16>┏[</>",
|
||||
```
|
||||
|
||||
If you also wanted to change the background color in the previous command, you would do so like this:
|
||||
|
||||
```json
|
||||
"prefix": "<#CB4B16,#FFFFFF>┏[</>",
|
||||
"template": "<#CB4B16,#FFFFFF>┏[</>",
|
||||
```
|
||||
|
||||
To change *only* the background color, just omit the first color from the above string:
|
||||
|
||||
```json
|
||||
"prefix": "<,#FFFFFF>┏[</>",
|
||||
"template": "<,#FFFFFF>┏[</>",
|
||||
```
|
||||
|
||||
## Palette
|
||||
|
|
|
@ -6,60 +6,54 @@ sidebar_label: Sample
|
|||
|
||||
```json
|
||||
{
|
||||
"final_space": true,
|
||||
"$schema": "https://raw.githubusercontent.com/JanDeDobbeleer/oh-my-posh/main/themes/schema.json",
|
||||
"blocks": [
|
||||
{
|
||||
"type": "prompt",
|
||||
"alignment": "right",
|
||||
"vertical_offset": -1,
|
||||
"segments": [
|
||||
{
|
||||
"type": "time",
|
||||
"style": "plain",
|
||||
"foreground": "#007ACC",
|
||||
"properties": {
|
||||
"template": " {{ .CurrentDate | date .Format }} ",
|
||||
"time_format": "15:04:05"
|
||||
}
|
||||
},
|
||||
"style": "plain",
|
||||
"type": "time"
|
||||
}
|
||||
]
|
||||
],
|
||||
"type": "prompt",
|
||||
"vertical_offset": -1
|
||||
},
|
||||
{
|
||||
"type": "prompt",
|
||||
"alignment": "left",
|
||||
"newline": true,
|
||||
"segments": [
|
||||
{
|
||||
"type": "session",
|
||||
"style": "diamond",
|
||||
"foreground": "#ffffff",
|
||||
"background": "#ffb300",
|
||||
"leading_diamond": "\uE0B6",
|
||||
"trailing_diamond": "\uE0B0",
|
||||
"foreground": "#ffffff",
|
||||
"leading_diamond": "\ue0b6",
|
||||
"properties": {
|
||||
"template": "{{ .UserName }}"
|
||||
}
|
||||
"template": " {{ .UserName }} "
|
||||
},
|
||||
"style": "diamond",
|
||||
"trailing_diamond": "\ue0b0",
|
||||
"type": "session"
|
||||
},
|
||||
{
|
||||
"type": "path",
|
||||
"style": "powerline",
|
||||
"powerline_symbol": "\uE0B0",
|
||||
"foreground": "#ffffff",
|
||||
"background": "#61AFEF",
|
||||
"foreground": "#ffffff",
|
||||
"powerline_symbol": "\ue0b0",
|
||||
"properties": {
|
||||
"prefix": " \uE5FF ",
|
||||
"style": "folder",
|
||||
"exclude_folders": [
|
||||
"/super/secret/project"
|
||||
]
|
||||
}
|
||||
],
|
||||
"style": "folder",
|
||||
"template": " {{ .Path }} "
|
||||
},
|
||||
"style": "powerline",
|
||||
"type": "path"
|
||||
},
|
||||
{
|
||||
"type": "git",
|
||||
"style": "powerline",
|
||||
"foreground": "#193549",
|
||||
"foreground_templates": [
|
||||
"{{ if and (gt .Ahead 0) (gt .Behind 0) }}#ffffff{{ end }}"
|
||||
],
|
||||
"background": "#2e9599",
|
||||
"background_templates": [
|
||||
"{{ if or (.Working.Changed) (.Staging.Changed) }}#f36943{{ end }}",
|
||||
|
@ -67,29 +61,38 @@ sidebar_label: Sample
|
|||
"{{ if gt .Ahead 0 }}#35b5ff{{ end }}",
|
||||
"{{ if gt .Behind 0 }}#f89cfa{{ end }}"
|
||||
],
|
||||
"powerline_symbol": "\uE0B0",
|
||||
"foreground": "#193549",
|
||||
"foreground_templates": [
|
||||
"{{ if and (gt .Ahead 0) (gt .Behind 0) }}#ffffff{{ end }}"
|
||||
],
|
||||
"powerline_symbol": "\ue0b0",
|
||||
"properties": {
|
||||
"fetch_status": true,
|
||||
"branch_max_length": 25,
|
||||
"template": "{{ .HEAD }}{{ .BranchStatus }}"
|
||||
}
|
||||
"fetch_status": true,
|
||||
"template": " {{ .HEAD }}{{ .BranchStatus }} "
|
||||
},
|
||||
"style": "powerline",
|
||||
"type": "git"
|
||||
},
|
||||
{
|
||||
"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": "<parentBackground>\uE0B0</> "
|
||||
}
|
||||
"template": "<parentBackground>\ue0b0</> \ue23a "
|
||||
},
|
||||
"style": "diamond",
|
||||
"trailing_diamond": "\ue0b4",
|
||||
"type": "exit"
|
||||
}
|
||||
]
|
||||
],
|
||||
"type": "prompt"
|
||||
}
|
||||
]
|
||||
],
|
||||
"final_space": true,
|
||||
"version": 1
|
||||
}
|
||||
```
|
||||
|
|
|
@ -29,7 +29,6 @@ starting point to create your own configuration.
|
|||
"foreground": "#ffffff",
|
||||
"background": "#61AFEF",
|
||||
"properties": {
|
||||
"prefix": " \uE5FF ",
|
||||
"style": "folder"
|
||||
}
|
||||
}
|
||||
|
|
|
@ -112,10 +112,7 @@ The following sample is based on the [AWS Segment][aws].
|
|||
"foreground_templates": [
|
||||
"{{if contains \"default\" .Profile}}#FFA400{{end}}",
|
||||
"{{if contains \"jan\" .Profile}}#f1184c{{end}}"
|
||||
],
|
||||
"properties": {
|
||||
"prefix": " \uE7AD "
|
||||
}
|
||||
]
|
||||
}
|
||||
```
|
||||
|
||||
|
|
|
@ -65,13 +65,12 @@ A temporary workaround is to use an invisible character at the end (`\u2800`).
|
|||
|
||||
```json
|
||||
{
|
||||
"type": "executiontime",
|
||||
/* other attributes here */
|
||||
"properties": {
|
||||
"type": "executiontime",
|
||||
/* other attributes here */
|
||||
"properties": {
|
||||
"always_enabled": true,
|
||||
"prefix": "\ufbab",
|
||||
"postfix": "\u2800" // invisible spacing character
|
||||
}
|
||||
"template": "\ufbab\u2800" // invisible spacing character
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
|
|
|
@ -18,7 +18,7 @@ Display the currently active Angular CLI version.
|
|||
"foreground": "#000000",
|
||||
"background": "#1976d2",
|
||||
"properties": {
|
||||
"prefix": "\uE753"
|
||||
"template": " \uE753 {{ .Full }} "
|
||||
}
|
||||
}
|
||||
```
|
||||
|
|
|
@ -18,8 +18,7 @@ Display the currently active AWS profile and region.
|
|||
"foreground": "#ffffff",
|
||||
"background": "#FFA400",
|
||||
"properties": {
|
||||
"prefix": " \uE7AD ",
|
||||
"template": "{{.Profile}}{{if .Region}}@{{.Region}}{{end}}"
|
||||
"template": " \uE7AD {{.Profile}}{{if .Region}}@{{.Region}}{{end}}"
|
||||
}
|
||||
}
|
||||
```
|
||||
|
|
|
@ -14,12 +14,11 @@ Display the currently active Azure subscription information.
|
|||
{
|
||||
"type": "az",
|
||||
"style": "powerline",
|
||||
"powerline_symbol": "\uE0B0",
|
||||
"powerline_symbol": "\uE0B0",
|
||||
"foreground": "#000000",
|
||||
"background": "#9ec3f0",
|
||||
"properties": {
|
||||
"template": "{{ .EnvironmentName }}",
|
||||
"prefix": " \uFD03 "
|
||||
"template": " \uFD03 {{ .EnvironmentName }}"
|
||||
}
|
||||
}
|
||||
```
|
||||
|
|
|
@ -18,7 +18,7 @@ Display the currently active Azure functions CLI version.
|
|||
"foreground": "#ffffff",
|
||||
"background": "#FEAC19",
|
||||
"properties": {
|
||||
"prefix": " \uf0e7 ",
|
||||
"template": " \uf0e7 {{ .Full }} ",
|
||||
"fetch_version": true,
|
||||
"display_mode": "files"
|
||||
}
|
||||
|
|
|
@ -26,8 +26,7 @@ Battery displays the remaining power percentage for your battery.
|
|||
"discharging_icon": "\uE231 ",
|
||||
"charging_icon": "\uE234 ",
|
||||
"charged_icon": "\uE22F ",
|
||||
"postfix": "\uF295 ",
|
||||
"template": "{{ if not .Error }}{{ .Icon }}{{ .Percentage }}{{ end }}"
|
||||
"template": " {{ if not .Error }}{{ .Icon }}{{ .Percentage }}{{ end }}\uF295 "
|
||||
}
|
||||
}
|
||||
```
|
||||
|
|
|
@ -18,7 +18,7 @@ Display the currently active crystal version.
|
|||
"foreground": "#ffffff",
|
||||
"background": "#4063D8",
|
||||
"properties": {
|
||||
"prefix": " \uE370 "
|
||||
"template": " \uE370 {{ .Full }} "
|
||||
}
|
||||
}
|
||||
```
|
||||
|
|
|
@ -18,7 +18,7 @@ Display the currently active dart version.
|
|||
"foreground": "#ffffff",
|
||||
"background": "#06A4CE",
|
||||
"properties": {
|
||||
"prefix": " \uE798 "
|
||||
"template": " \uE798 {{ .Full }} "
|
||||
}
|
||||
}
|
||||
```
|
||||
|
|
|
@ -18,7 +18,7 @@ Display the currently active .NET SDK version.
|
|||
"foreground": "#000000",
|
||||
"background": "#00ffff",
|
||||
"properties": {
|
||||
"prefix": " \uE77F "
|
||||
"template": " \uE77F {{ .Full }} "
|
||||
}
|
||||
}
|
||||
```
|
||||
|
|
|
@ -24,7 +24,7 @@ The installation guide shows how to include this argument for PowerShell and Zsh
|
|||
"properties": {
|
||||
"threshold": 500,
|
||||
"style": "austin",
|
||||
"prefix": " <#fefefe>\ufbab</> "
|
||||
"template": " <#fefefe>\ufbab</> "
|
||||
}
|
||||
}
|
||||
```
|
||||
|
|
|
@ -23,8 +23,7 @@ Displays the last exit code or that the last command failed based on the configu
|
|||
"trailing_diamond": "\uE0B4",
|
||||
"properties": {
|
||||
"always_enabled": true,
|
||||
"template": "\uE23A",
|
||||
"prefix": "<#193549>\uE0B0</> "
|
||||
"template": "<#193549>\uE0B0</> \uE23A "
|
||||
}
|
||||
}
|
||||
```
|
||||
|
|
|
@ -18,7 +18,7 @@ Display the currently active golang version.
|
|||
"foreground": "#ffffff",
|
||||
"background": "#7FD5EA",
|
||||
"properties": {
|
||||
"prefix": " \uFCD1 "
|
||||
"template": " \uFCD1 {{ .Full }} "
|
||||
}
|
||||
}
|
||||
```
|
||||
|
|
|
@ -18,7 +18,7 @@ Display the currently active java version.
|
|||
"foreground": "#ffffff",
|
||||
"background": "#4063D8",
|
||||
"properties": {
|
||||
"prefix": " \uE738 "
|
||||
"template": " \uE738 {{ .Full }}"
|
||||
}
|
||||
}
|
||||
```
|
||||
|
|
|
@ -18,7 +18,7 @@ Display the currently active julia version.
|
|||
"foreground": "#ffffff",
|
||||
"background": "#4063D8",
|
||||
"properties": {
|
||||
"prefix": " \uE624 "
|
||||
"template": " \uE624 {{ .Full }} "
|
||||
}
|
||||
}
|
||||
```
|
||||
|
|
|
@ -18,8 +18,7 @@ Display the currently active Kubernetes context name and namespace name.
|
|||
"foreground": "#000000",
|
||||
"background": "#ebcc34",
|
||||
"properties": {
|
||||
"prefix": " \uFD31 ",
|
||||
"template": "{{.Context}}{{if .Namespace}} :: {{.Namespace}}{{end}}"
|
||||
"template": " \uFD31 {{.Context}}{{if .Namespace}} :: {{.Namespace}}{{end}} "
|
||||
}
|
||||
}
|
||||
```
|
||||
|
|
|
@ -22,7 +22,7 @@ The Nerdbank.GitVersioning CLI can be a bit slow causing the prompt to feel slow
|
|||
"foreground": "#ffffff",
|
||||
"background": "#3a579a",
|
||||
"properties": {
|
||||
"prefix": " \uF1D2 "
|
||||
"template": " \uF1D2 {{ .Version }} "
|
||||
}
|
||||
}
|
||||
```
|
||||
|
|
|
@ -18,7 +18,7 @@ Display the currently active node version.
|
|||
"foreground": "#ffffff",
|
||||
"background": "#6CA35E",
|
||||
"properties": {
|
||||
"prefix": " \uE718 "
|
||||
"template": " \uE718 {{ .Full }} "
|
||||
}
|
||||
}
|
||||
```
|
||||
|
|
|
@ -17,7 +17,7 @@ Display OS specific info - defaults to Icon.
|
|||
"foreground": "#26C6DA",
|
||||
"background": "#546E7A",
|
||||
"properties": {
|
||||
"postfix": " \uE0B1",
|
||||
"template": " {{ if .WSL }}WSL at {{ end }}{{.Icon}}\uE0B1",
|
||||
"macos": "mac"
|
||||
}
|
||||
}
|
||||
|
|
|
@ -18,7 +18,7 @@ Display the currently active php version.
|
|||
"foreground": "#ffffff",
|
||||
"background": "#4063D8",
|
||||
"properties": {
|
||||
"prefix": " \ue73d ",
|
||||
"template": " \ue73d {{ .Full }} ",
|
||||
}
|
||||
}
|
||||
```
|
||||
|
|
|
@ -19,7 +19,7 @@ Supports conda, virtualenv and pyenv.
|
|||
"foreground": "#100e23",
|
||||
"background": "#906cff",
|
||||
"properties": {
|
||||
"prefix": " \uE235 "
|
||||
"template": " \uE235 {{ .Full }} "
|
||||
}
|
||||
}
|
||||
```
|
||||
|
|
|
@ -18,7 +18,7 @@ Display the currently active ruby version.
|
|||
"foreground": "#ffffff",
|
||||
"background": "#4063D8",
|
||||
"properties": {
|
||||
"prefix": " \uE791 "
|
||||
"template": " \uE791 {{ .Full }}"
|
||||
}
|
||||
}
|
||||
```
|
||||
|
|
|
@ -18,7 +18,7 @@ Display the currently active rust version.
|
|||
"foreground": "#193549",
|
||||
"background": "#99908a",
|
||||
"properties": {
|
||||
"prefix": " \uE7a8 "
|
||||
"template": " \uE7a8 {{ .Full }} "
|
||||
}
|
||||
}
|
||||
```
|
||||
|
|
|
@ -21,7 +21,6 @@ On macOS, all states are supported (playing/paused/stopped).
|
|||
"foreground": "#ffffff",
|
||||
"background": "#1BD760",
|
||||
"properties": {
|
||||
"prefix": "\uF9C6 ",
|
||||
"playing_icon": "\uE602 ",
|
||||
"paused_icon": "\uF8E3 ",
|
||||
"stopped_icon": "\uF04D "
|
||||
|
|
|
@ -18,10 +18,8 @@ Display SysInfo.
|
|||
"background": "#8f43f3",
|
||||
"invert_powerline": true,
|
||||
"properties": {
|
||||
"prefix": " \uf85a ",
|
||||
"postfix": "% ",
|
||||
"precision": 2,
|
||||
"template":"{{ round .PhysicalPercentUsed .Precision }}"
|
||||
"template":" \uf85a {{ round .PhysicalPercentUsed .Precision }}% "
|
||||
},
|
||||
"style":"powerline"
|
||||
},
|
||||
|
|
|
@ -16,8 +16,7 @@ Display text.
|
|||
"style": "plain",
|
||||
"foreground": "#E06C75",
|
||||
"properties": {
|
||||
"prefix": "",
|
||||
"template": " \u276F"
|
||||
"template": "\u276F"
|
||||
}
|
||||
}
|
||||
```
|
||||
|
|
|
@ -25,7 +25,6 @@ The free tier for is sufficient. You'll find the API key in your profile setting
|
|||
"foreground": "#ffffff",
|
||||
"background": "#007acc",
|
||||
"properties": {
|
||||
"prefix": " \uf7d9 ",
|
||||
"url": "https://wakatime.com/api/v1/users/current/summaries?start=today&end=today&api_key=API_KEY",
|
||||
"cache_timeout": 10,
|
||||
"http_timeout": 500
|
||||
|
|
|
@ -26,8 +26,7 @@ Supported registry key types:
|
|||
"properties": {
|
||||
"path": "HKLM\\software\\microsoft\\windows nt\\currentversion\\buildlab",
|
||||
"fallback":"unknown",
|
||||
"template":"{{ .Value }}",
|
||||
"prefix": " \uE62A "
|
||||
"template":" \uE62A {{ .Value }}"
|
||||
}
|
||||
},
|
||||
```
|
||||
|
|
|
@ -23,7 +23,6 @@ Remote Control password.
|
|||
"foreground": "#ffffff",
|
||||
"background": "#FF0000",
|
||||
"properties": {
|
||||
"prefix": "\uF16A ",
|
||||
"playing_icon": "\uE602 ",
|
||||
"paused_icon": "\uF8E3 ",
|
||||
"stopped_icon": "\uF04D "
|
||||
|
|
Loading…
Reference in a new issue