美文网首页
Windows Termial配置

Windows Termial配置

作者: HAPPYers | 来源:发表于2019-07-18 11:15 被阅读0次

设置背景图片

步骤

git clone https://github.com/powerline/fonts
cd fonts
./install.ps1

这个时候要等待把字体库全部装完。
(使用管理员权限运行,安装失败建议使用set-executionpolicy Bypass)
使用

choco install firacode

然后在配置文件的fontFace中更改字体为firacode
例如

配置单powershell

在新的terminal中执行code $profile
然后在配置文件中会看到

Import-Module posh-git 
Import-Module oh-my-posh 
Set-Theme Agnoster #Set-Theme robbyrussell

# Chocolatey profile
$ChocolateyProfile = "$env:ChocolateyInstall\helpers\chocolateyProfile.psm1"
if (Test-Path($ChocolateyProfile)) {
  Import-Module "$ChocolateyProfile"
}

修改提示文字

在ps中执行code $profile(此时会以vscode打开,如果没有vscode,可以note $profile)


然后添加上function prompt{"HAPPY: $pwd >"}就能自定义文字了。
注意,如果要在自定义文字中加入emoji,需要将文件以UTF-16 LE格式保存。

相关文章

网友评论

      本文标题:Windows Termial配置

      本文链接:https://www.haomeiwen.com/subject/ugmklctx.html