Window Terminal美化💖

Window Terminal美化💖

Window Terminal终端程序是一款新式、快速、高效、强大且高效的终端应用程序,适用于命令行工具和命令提示符,PowerShellWSLShell用户。
主要功能包括多个选项卡、窗格、Unicode、和UTF-8字符支持,GPU加速文本渲染引擎以及自定义主题、样式和配置

安装Window Terminal

安装Window Terminal,通过Microsoft Store商店安装即可,安装Window Terminal对系统有一定的要求。系统版本必须为Windows 10版本 18362.0或更好的版本,必须为x86 ARM64 x64体系结构。
Window Terminal是一个开源项目,地址

配置字体

这里我使用的事Fira Code字体,地址

配置主题

这里我使用的是posh-git、on-my-posh主题。
安装,使用window powerShell 最好使用管理员权限

window powerShell
1
2
Install-Module posh-git -Scope CurrentUser 
Install-Module oh-my-posh -Scope CurrentUser

配置和切换主题

window powerShell
1
2
3
4
$PROFILE

if (!(Test-Path -Path $PROFILE )) { New-Item -Type File -Path $PROFILE -Force }
notepad $PROFILE

也可直接使用命令$PROFILE,会输出默认配置文件的地址,一般会在C盘

在打开的文件中添加,这样配置的是默认的主题

ps1
1
2
3
Import-Module posh-git
Import-Module oh-my-posh
Set-Theme Sorin

切换主题

Git Bash/Shell/Terminal
1
Set-Theme ${主题名字}

以下是可用的主题名字:Agnoster、Avit、Darkblood、Fish、Honukai、Paradox、Sorin、tehrob

配置Window Terminal

打开设置

window terminal
添加defaults和schemes

点击展开代码 >folded
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
"defaults": {
// Put settings here that you want to apply to all profiles.
"fontFace": "Fira Code", // oh-my-posh 主题原因,使用其他的字体可能会出现乱码
"backgroundImage": "F:\\vscodeBg\\014.jpg", // 背景图片地址
"backgroundImageOpacity": 0.4, // 透明度
"colorScheme": "Andromeda", // 颜色方案
"acrylicOpacity": 0.7,
"useAcrylic": true
},
"schemes": [
{
"name": "Andromeda",
"black": "#000000",
"red": "#cd3131",
"green": "#05bc79",
"yellow": "#09da0f",
// "yellow": "#e5e512",
"blue": "#2472c8",
"purple": "#bc3fbc",
"cyan": "#0fa8cd",
"white": "#e5e5e5",
"brightBlack": "#666666",
"brightRed": "#cd3131",
"brightGreen": "#05bc79",
"brightYellow": "#09da0f",
// "brightYellow": "#e5e512",
"brightBlue": "#2472c8",
"brightPurple": "#bc3fbc",
"brightCyan": "#0fa8cd",
"brightWhite": "#e5e5e5",
"background": "#262a33",
"foreground": "#e5e5e5"
},
{
"name": "Campbell",
"foreground": "#F2F2F2",
"background": "#0C0C0C",
"colors": [
"#0C0C0C",
"#C50F1F",
"#13A10E",
"#C19C00",
"#0037DA",
"#881798",
"#3A96DD",
"#CCCCCC",
"#767676",
"#E74856",
"#16C60C",
"#F9F1A5",
"#3B78FF",
"#B4009E",
"#61D6D6",
"#F2F2F2"
]
},
{
"name": "Solarized Dark",
"foreground": "#FDF6E3",
"background": "#073642",
"colors": [
"#073642",
"#D30102",
"#859900",
"#B58900",
"#268BD2",
"#D33682",
"#2AA198",
"#EEE8D5",
"#002B36",
"#CB4B16",
"#586E75",
"#657B83",
"#839496",
"#6C71C4",
"#93A1A1",
"#FDF6E3"
]
}
]

官方配置详解


Something wrong with this article? Click here to submit your revision.

Vector Landscape Vectors by Vecteezy

作者

blacklisten

发布于

2020-07-13

许可协议

CC BY-NC-SA 4.0

评论

Your browser is out-of-date!

Update your browser to view this website correctly.&npsb;Update my browser now

×