[cmd/powershell/vscode] 美化终端

Windows 11系统cmd终端美化、Vscode终端美化

Powershell + clink整合cmd教程

其他

powershell 修改默认配置

需要再对应终端(ps/vsc)输入 notepad $profile

并输入以下代码, 主题选择自己的主题

oh-my-posh init pwsh --config "$env:POSH_THEMES_PATH\jandedobbeleer.omp.json" | Invoke-Expression

自用主题

字体用的是 FiraMono Nerd Font

{
  "$schema": "https://raw.githubusercontent.com/JanDeDobbeleer/oh-my-posh/main/themes/schema.json",
  "blocks": [
    {
      "alignment": "left",
      "segments": [
        {
          "style": "diamond",
          "background": "#FFDE57",
          "foreground": "#111111",
          "leading_diamond": "\ue0b2",
          "properties": {
            "display_mode": "environment",
            "fetch_virtual_env": true,
            "home_enabled": true
          },

          "template": " \ue235 {{ if .Venv }}({{ .Venv }}){{ end }} ",
          "type": "python"
        },
        {
          "background": "#FEF5ED",
          "leading_diamond": "\ue0b2",
          "properties": {
            "macos": "\uf179 ",
            "ubuntu": "\uf31b ",
            "windows": "\ue62a "
          },
          "style": "diamond",
          "template": " {{ if .WSL }}WSL at {{ end }}{{.Icon}}",
          "type": "os"
        },
        {
          "background": "#ff479c",
          "foreground": "#d6deeb",
          "leading_diamond": "\ue0b2",
          "properties": {
            "time_format": "15:04:05"
          },
          "style": "diamond",
          "template": " \u2665 {{ .CurrentDate | date .Format }} ",
          "type": "time"
        },
        {
          "background": "#3ccba2",
          "foreground": "#d6deeb",
          "leading_diamond": "\ue0b2",
          "properties": {
            "branch_icon": "\ue725 ",
            "fetch_stash_count": true,
            "fetch_status": true
          },
          "style": "diamond",
          "template": " {{ .UpstreamIcon }}{{ .HEAD }}{{if .BranchStatus }} {{ .BranchStatus }}{{ end }}",
          "type": "git"
        },
        {
          "background": "#575656",
          "foreground": "#d6deeb",
          "leading_diamond": "\ue0b2",
          "properties": {
            "style": "roundrock",
            "threshold": 0
          },
          "style": "diamond",
          "template": " {{ .FormattedMs }} ",
          "type": "executiontime"
        }
      ],
      "type": "prompt"
    },
    {
      "alignment": "left",
      "newline": true,
      "segments": [
        {
          "foreground": "#ff479c",
          "properties": {
            "folder_icon": "\uf07b",
            "home_icon": "home",
            "style": "agnoster_full"
          },
          "style": "diamond",
          "template": " \ue5ff {{ .Path }} ",
          "type": "path"
        },
        {
          "foreground": "#ff479c",
          "foreground_templates": ["{{ if gt .Code 0 }}#ff0000{{ end }}"],
          "properties": {
            "always_enabled": true
          },
          "style": "plain",
          "template": " \ueb05 ",
          "type": "status"
        }
      ],
      "type": "prompt"
    }
  ],
  "console_title_template": "{{.Folder}}{{if .Root}} :: root{{end}} :: {{.Shell}}",
  "final_space": true,
  "osc99": true,
  "console_title": true,
  "console_title_style": "template",
  "transient_prompt": {
    "background": "transparent",
    "foreground": "#FEF5ED",
    "template": "\ue285 "
  },
  "version": 2
}

给TA充电
共{{data.count}}人
人已充电
go编程

[go]window下vscode无法调试 The "dlv" command is not available

2024-3-12 0:42:11

go编程

[Go]vscode配置 | 解决跨文件调试函数undefined

2024-3-28 3:37:18

0 条回复 A文章作者 M管理员
    暂无讨论,说说你的看法吧
个人中心
今日签到
搜索