前言
本文简记 Windows Terminal 美化以及遇到的一些问题。
最近由于 office 激活次数已达上限的原因,换回了之前的旧电脑并重装了系统,所以这次来记录一下,以免后续又忘了怎么做。
安装
-
我是用的是从 Microsoft Store 上下的,存在一定要求:
-
系统:Windows 10 18362.0 或更高版本。
就是至少在 1903 及以上。
-
-
没试过用 git 安装,不知有没有要求。
全局设置
- 我都设置在全局设置
"defaults"
数组中,懒得每种窗口都定义下。- 请参阅官方文档: 自定义设置 - 全局设置 。
美化工具
- 这里使用 oh-my-posh 作为美化工具。
- 具体看作者文档: JanDeDobbeleer/oh-my-posh 。
适配字体
- 使用之前默认的字体,会造成 oh-my-posh 的主题出现乱码,这里安装
JetBrains Mono
作为适配字体,并添加到"defaults"
中。- 官方网站: JetBrains Mono 。
配色方案
-
请参阅: Windows Terminal 配色方案说明 。
里面具体写了配色方案每一个 key 的大致作用,以及我的配色方案。
我的效果图也在其中。
defaults 数组
-
我的:
...... "defaults": { // Put settings here that you want to apply to all profiles. "acrylicOpacity": 0.8, //背景透明度 "useAcrylic": true, // 启用毛玻璃 "backgroundImage": "C:\Bat\basics\initTerminalBackgroud\terminalBg.jpg", //背景图片 "backgroundImageOpacity": 0.8, //图片透明度 "backgroundImageStretchMode": "fill", //填充模式 "icon": "ms-appx:///ProfileIcons/{9acb9455-ca41-5af7-950f-6bca1bc9722f}.png", //图标 "fontFace": "JetBrains Mono", "fontSize": 12, //文字大小 "colorScheme": "Terminal Salf Scheme", //主题 "cursorColor": "#ffffff", //光标颜色 "cursorShape": "bar", //光标形状 "startingDirectory":"C://Amber//" //起始目录 }, ......