oh-my-posh 自己使用配置
%USERPROFILE\%zf_october_comb.omp.json
{ "$schema": "https://raw.githubusercontent.com/JanDeDobbeleer/oh-my-posh/main/themes/schema.json", "console_title_template": "{{if .Root}}⚡ {{end}}{{.Folder}}", "blocks": [ { "type": "prompt", "alignment": "left", "segments": [ { "template": "\u250c ", "foreground": "#ffce7b", "type": "text", "style": "plain" }, { "template": " \uf26c {{ if .SSHSession }}\ueba9 {{ end }} ", "foreground": "#1d1626", "powerline_symbol": "\ue0b0", "background": "#ffce7b", "type": "session", "style": "powerline" }, { "properties": { "windows": "\uf17a" }, "template": " {{ if .WSL }}WSL at {{ end }}{{.Icon}} ", "foreground": "#fffef9", "powerline_symbol": "\ue0b0", "background": "#C678DD", "type": "os", "style": "powerline" }, { "properties": { "style": "full" }, "template": "{{ path .Path .Location }} ", "foreground": "#fffef9", "powerline_symbol": "\ue0b0", "background": "#C678DD", "type": "path", "style": "powerline" }, { "properties": { "always_enabled": true }, "template": " \uf064 {{ .FormattedMs }} ", "foreground": "#fffef9", "powerline_symbol": "\ue0b0", "background": "#33a3dc", "type": "executiontime", "style": "powerline" }, { "template": " \uf12a >>{{ reason .Code }} ", "foreground": "#fffef9", "powerline_symbol": "\ue0b0", "background": "#ed1941", "type": "status", "style": "powerline" } ] }, { "type": "prompt", "alignment": "right", "segments": [ { "properties": { "fetch_package_manager": true, "npm_icon": " <#cc3a3a>\ue5fa</> ", "yarn_icon": " <#348cba>\ue6a7</>" }, "leading_diamond": "\ue0b2", "trailing_diamond": "<transparent,#ffffff>\ue0b2</>", "template": "\ue718 {{ if .PackageManagerIcon }}{{ .PackageManagerIcon }} {{ end }}{{ .Full }}", "foreground": "#000000", "background": "#ffffff", "type": "node", "style": "diamond" }, { "properties": { "azure_devops_icon": "\uebd8 ", "bitbucket_icon": "\uf171 ", "branch_gone_icon": "\uebcc ", "branch_icon": "\ue725 ", "branch_identical_icon": "\uf4c4 ", "commit_icon": "\uf417 ", "fetch_stash_count": true, "fetch_status": true, "fetch_upstream_icon": true, "fetch_worktree_count": true, "git_icon": "\uf1d3 ", "github_icon": "\uf408 ", "gitlab_icon": "\uf296 ", "tag_icon": "\uf412 " }, "leading_diamond": "\ue0b2", "trailing_diamond": "\ue0b0", "template": " {{ .UpstreamIcon }}{{ .HEAD }}{{if .BranchStatus }} {{ .BranchStatus }}{{ end }}{{ if .Working.Changed }} <#ed1941>\uf044 {{.Working.String}}</>{{ end }}{{ if and (.Working.Changed) (.Staging.Changed) }} |{{ end }}{{ if .Staging.Changed }} <#225a1f>\uf046 {{.Staging.String}}</>{{ end }}{{ if gt .StashCount 0 }} \ueb4b {{.StashCount}}{{ end }}{{ if gt .WorktreeCount 0 }}{{if .IsWorkTree}}<#1d953f>{{ end }} \uf1bb {{if .IsWorkTree}}</>{{ end }}{{.WorktreeCount}}{{ end }} ", "foreground": "#100e23", "background": "#fffffb", "type": "git", "style": "diamond", "background_templates": [ "{{ if or (.Working.Changed) (.Staging.Changed) }}#ffeb95{{ end }}", "{{ if and (gt .Ahead 0) (gt .Behind 0) }}#fcaf17{{ end }}", "{{ if gt .Ahead 0 }}#95ffa4{{ end }}", "{{ if gt .Behind 0 }}#f7acbc{{ end }}", "{{ if .UpstreamGone }}#d1c7b7{{ end }}" ] } ] }, { "type": "prompt", "alignment": "left", "segments": [ { "template": "\u2514", "foreground": "#ffce7b", "type": "text", "style": "plain" }, { "template": " $", "foreground": "#ffffff", "type": "text", "style": "plain" } ], "newline": true } ], "version": 3, "final_space": true }
【推荐】国内首个AI IDE,深度理解中文开发场景,立即下载体验Trae
【推荐】编程新体验,更懂你的AI,立即体验豆包MarsCode编程助手
【推荐】抖音旗下AI助手豆包,你的智能百科全书,全免费不限次数
【推荐】轻量又高性能的 SSH 工具 IShell:AI 加持,快人一步