windows 美化 cmd

官网:https://ohmyposh.dev/docs/themes

一 、安装终端

  1. 安装 Windows Terminalhttps://github.com/microsoft/terminal/releases/tag/v1.21.2701.0

  2. 或者安装oh-my-posh(Windows自带终端就可以美化)
    windows应用商店搜索oh-my-posh安装

官网下载:https://chrisant996.github.io/clink/
发布页下载:https://github.com/chrisant996/clink/tags

三 、美化 CMD

1 、在Clink安装目录新建oh-my-posh.lua文件,下面是内容

  • 我的路径:C:\Installation directory\clink\oh-my-posh.lua
1
load(io.popen('oh-my-posh init cmd'):read("*a"))()

2.1 、修改主题

官网查看效果记录一下名字:https://ohmyposh.dev/docs/themes
去oh-my-posh安装目录:C:\Users\墨不凡\AppData\Local\Programs\oh-my-posh\themes\目录下有主题文件
绝对路径:C:\Users\墨不凡\AppData\Local\Programs\oh-my-posh\themes\atomic.omp.json
添加的内容:--config C:\\Users\\墨不凡\\AppData\\Local\\Programs\\oh-my-posh\\themes\\atomic.omp.json

2.1 、在Clink安装目录新建oh-my-posh.lua文件,下面是内容

  • 我的路径:C:\Installation directory\clink\oh-my-posh.lua
1
load(io.popen('oh-my-posh init cmd --config C:\\Users\\墨不凡\\AppData\\Local\\Programs\\oh-my-posh\\themes\\atomic.omp.json'):read("*a"))()