2

Windows Terminal的美化

 3 years ago
source link: https://codeyang.pages.dev/archives/wterminal
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.
neoserver,ios ssh client
一只会敲代码的Sheep

Windows Terminal的美化

发表于2021-07-11|更新于2021-07-11|Windows
阅读量:3

Windows Terminal

与一般软件的设置界面不同,Windows Terminal 采用 json 文件对 Terminal 进行设置。单击设置,会打开一个settings.json的文件。现在的Windows 10应该会在你点击“设置”后提示你用什么软件来打开json文件。

Windows Terminal 美化

设置中可以选择预设配置配色和字体,新版加入了可视化设置,可以设置透明度(毛玻璃)

安装 Powerline 字体

下载 Meslo LGM NF 1字体来支持 Oh-my-Posh V3 的特殊符号

安装 posh-git 以及 oh-my-posh

Install-Module posh-git -Scope CurrentUser
Install-Module oh-my-posh -Scope CurrentUser

在 PowerShell 中设置 Powerline

在 PowerShell 中输入notepad $profile用文本文档打开 PowerShell 配置文件。

Import-Module posh-git
Import-Module oh-my-posh
Set-PoshPrompt -Theme Paradox

现在,每个新实例启动时都会导入 Posh-Git 和 Oh-My-Posh,然后从 Oh-My-Posh 设置 Paradox 主题。内置主题

  1. win10左下角点击logo,找到Windows Powershell,右击,然后以管理员身份打开.
  2. 输入
    get-ExecutionPolicy   # 查看系统执行策略状态
    set-executionpolicy remotesigned # 修改执行策略状态

PowerShell 的更新

自带的 PS 版本 是 5.0 的 ,可以升级到更高版本, 目前稳定版本为 7.x

$PSVersionTable.PSVersion.Major   #查看Powershell版本
$PSVersionTable.CLRVersion.Major  #查看.NET Framework版本

这里找到**x64.msi,下载安装即可。


About Joyk


Aggregate valuable and interesting links.
Joyk means Joy of geeK