windows terminal的oh-my-posh主题示例

基于di4am0nd主题改进

{
    "$schema": "https://raw.githubusercontent.com/JanDeDobbeleer/oh-my-posh/main/themes/schema.json",
    "blocks": [
      {
        "alignment": "left",
        "segments": [
          {
            "foreground": "#FFBD00",
            "style": "plain",
            "template": "{{ .UserName }}'s ",
            "type": "session"
          },
          {
            "foreground": "#00C6F7",
            "properties": {
              "style": "folder"
            },
            "style": "plain",
            "template": "{{ .Path }}/ ",
            "type": "path"
          },
          {
            "foreground": "#F62F2E",
            "properties": {
              "fetch_status": true
            },
            "style": "plain",
            "template": "<#ffffff>on</> {{ .HEAD }}{{if .BranchStatus }} {{ .BranchStatus }}{{ end }}{{ if .Working.Changed }} \uf044 {{ .Working.String }}{{ end }}{{ if and (.Working.Changed) (.Staging.Changed) }} |{{ end }}{{ if .Staging.Changed }} \uf046 {{ .Staging.String }}{{ end }} ",
            "type": "git"
          },
          {
            "foreground": "#98C379",
            "properties": {
              "fetch_version": true
            },
            "style": "plain",
            "template": " \ue781 {{ if .PackageManagerIcon }}{{ .PackageManagerIcon }} {{ end }}{{ .Full }} ",
            "type": "node"
          },
          {
            "foreground": "#FFDE57",
            "properties": {
              "fetch_version": true
            },
            "style": "powerline",
            "template": " \ue235 {{ if .Error }}{{ .Error }}{{ else }}{{ .Venv }} {{ .Full }}{{ end }} ",
            "type": "python"
          },
          {
            "foreground": "#00acd7",
            "properties": {
              "fetch_version": true
            },
            "style": "powerline",
            "template": " \ue627 {{ if .Error }}{{ .Error }}{{ else }}{{ .Full }}{{ end }} ",
            "type": "go"
          }
        ],
        "type": "prompt"
      },
      {
        "alignment": "right",
        "segments": [
          {
            "foreground": "#85C980",
            "style": "diamond",
            "template": "RAM:{{ (div ((sub .PhysicalTotalMemory .PhysicalFreeMemory)|float64) 1000000000.0) }}/{{ (div .PhysicalTotalMemory 1000000000.0) }}GB ",
            "trailing_diamond": " ",
            "type": "sysinfo"
          },
          {
            "foreground": "#ffffff",
            "leading_diamond": "\u250b",
            "properties": {
              "style": "galvestonms",
              "threshold": 0
            },
            "style": "diamond",
            "template": " {{ .FormattedMs }} ",
            "type": "executiontime"
          }
        ],
        "type": "prompt"
      },
      {
        "alignment": "left",
        "newline": true,
        "segments": [
          {
            "foreground": "#FFBD00",
            "style": "plain",
            "template": "\u2b9e ",
            "type": "text"
          }
        ],
        "type": "prompt"
      }
    ],
    "final_space": true,
    "version": 2
  }
  
  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值