01 / Shell
Zsh
- Shell
- Zsh
- Framework
- Oh My Zsh
- Prompt
- Oh My Posh
- Plugins
- zsh-syntax-highlighting · zsh-autosuggestions
Oh My Posh config
config.omp.json{
"$schema": "https://raw.githubusercontent.com/JanDeDobbeleer/oh-my-posh/main/themes/schema.json",
"version": 4,
"final_space": true,
"console_title_template": "{{ .Folder }} · {{ .PWD }}",
"palette": {
"git_clean": "#7dc4e4",
"git_dirty": "#8bd5ca",
"git_ahead": "#91a3d7",
"git_behind": "#a6addf",
"git_diverged": "#b7bdf8",
"git_branch": "#d3dcff",
"home": "#6cb6ff",
"slash": "#7faed8",
"folder": "#98aef8",
"current": "#c4b5fd",
"prompt": "#8bd5ca",
"prompt_error": "#f38ba8",
"time": "#94e2d5",
"exec": "#b8c0ff",
"muted": "#7f849c"
},
"secondary_prompt": {
"background": "transparent",
"foreground": "p:muted",
"template": "› "
},
"blocks": [
{
"type": "rprompt",
"segments": [
{
"type": "executiontime",
"style": "plain",
"foreground": "p:exec",
"template": "{{ .FormattedMs }} ",
"properties": {
"threshold": 2500,
"style": "austin"
}
},
{
"type": "time",
"style": "plain",
"foreground": "p:time",
"template": "{{ .CurrentDate | date .Format }}",
"properties": {
"time_format": "3:04:05 PM"
}
}
]
},
{
"type": "prompt",
"alignment": "left",
"segments": [
{
"type": "git",
"style": "plain",
"foreground": "p:git_clean",
"foreground_templates": [
"{{ if and (gt .Ahead 0) (gt .Behind 0) }}p:git_diverged{{ end }}",
"{{ if gt .Ahead 0 }}p:git_ahead{{ end }}",
"{{ if gt .Behind 0 }}p:git_behind{{ end }}",
"{{ if or (.Working.Changed) (.Staging.Changed) }}p:git_dirty{{ end }}"
],
"template": "{{ if .HEAD }}{{ if or (.Working.Changed) (.Staging.Changed) }}<p:git_dirty></>{{ else if and (gt .Ahead 0) (gt .Behind 0) }}<p:git_diverged></>{{ else if gt .Ahead 0 }}<p:git_ahead></>{{ else if gt .Behind 0 }}<p:git_behind></>{{ else }}<p:git_clean></>{{ end }} <p:git_branch>{{ .HEAD }}</> {{ end }}",
"properties": {
"fetch_status": true,
"fetch_upstream_icon": false,
"source": "cli",
"branch_icon": "",
"branch_identical_icon": "",
"branch_ahead_icon": "",
"branch_behind_icon": "",
"branch_gone_icon": ""
}
},
{
"type": "path",
"style": "plain",
"template": "{{ .Path }} ",
"properties": {
"style": "agnoster_full",
"home_icon": "~",
"folder_separator_icon": "/",
"folder_separator_template": "<p:slash>/</>",
"left_format": "<p:home>%s</>",
"folder_format": "<p:folder>%s</>",
"right_format": "<p:current>%s</>"
}
},
{
"type": "text",
"style": "plain",
"foreground": "p:prompt",
"foreground_templates": [
"{{ if gt .Code 0 }}p:prompt_error{{ end }}"
],
"template": "$"
}
]
}
]
}


