本帖最后由 KUN_IDE 于 2019-11-14 20:37 编辑
基于oh-my-posh的Win10PowerShell主题美化准备工作安装好git(为安装主题模块而准备)git下载https://git-scm.com/downloads 安装好等距更纱黑体 (防止主题显示不正常)(下载第一个压缩包解压后挑一个安装,我安装的是sarasa-mono-sc-regular.ttf)然后将powershell的字体设置为等距更纱黑体更纱黑体下载https://github.com/be5invis/Sarasa-Gothic/releases set-executionpolicy remotesigned -scope currentuser设置本地脚本可运行 (在powershell中执行,避免报错建议用管理员权限运行powershell)
开始(打开powershell,在powershell中执行代码)安装 posh-git 和 oh-my-posh 两个模块Install-Module posh-git -Scope CurrentUser Install-Module oh-my-posh -Scope CurrentUser 新建一个powershell的配置文件if (!(Test-Path -Path $PROFILE )) { New-Item -Type File -Path $PROFILE -Force } 用记事本打开配置文件notepad $PROFILE 在配置文件中添加如下内容Import-Module posh-git Import-Module oh-my-posh Set-Theme Paradox //(设置默认的主题)
预览可到源项目网址查看效果源项目地址https://github.com/JanDeDobbeleer/oh-my-posh
|