原文章来自 lostsheep 佬友的终端精致小玩具 - Ghostty
后经过 ai 帮我生成了 Windows 端的相关文件设置
效果图:

Windows Terminal settings.json 设置

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
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
{
"$help": "https://aka.ms/terminal-documentation",
"$schema": "https://aka.ms/terminal-profiles-schema",
"actions": [],
"copyFormatting": "none",
"copyOnSelect": false,
"defaultProfile": "{574e775e-4f2a-5b96-ac1e-a2962a402336}",
"keybindings":
[
{
"id": "Terminal.CopyToClipboard",
"keys": "ctrl+c"
},
{
"id": "User.sendInput.945C32C5",
"keys": "ctrl+enter"
},
{
"id": "Terminal.FindText",
"keys": "ctrl+shift+f"
},
{
"id": "Terminal.PasteFromClipboard",
"keys": "ctrl+v"
},
{
"id": "User.sendInput.8F63D3A9",
"keys": "shift+enter"
},
{
"id": "Terminal.DuplicatePaneAuto",
"keys": "alt+shift+d"
}
],
"newTabMenu":
[
{
"type": "remainingProfiles"
}
],
"profiles":
{
"defaults":
{
"colorScheme": "GitHub Dark Dimmed",
"cursorColor": "#FF9E64",
"font":
{
"face": "Maple Mono NF CN",
"features":
{
"calt": 1,
"cv01": 1,
"cv03": 1,
"ss01": 1,
"ss02": 1,
"ss03": 1
},
"size": 11,
"weight": "normal"
},
"historySize": 100000,
"opacity": 100,
"padding": "8",
"scrollbarState": "hidden"
},
"list":
[...]
},
"schemes":
[
{
"background": "#22272E",
"black": "#1C2128",
"blue": "#58A6FF",
"brightBlack": "#444C56",
"brightBlue": "#79C0FF",
"brightCyan": "#56D4DD",
"brightGreen": "#56D364",
"brightPurple": "#D2A8FF",
"brightRed": "#FFA198",
"brightWhite": "#CDD9E5",
"brightYellow": "#E3B341",
"cursorColor": "#FF9E64",
"cyan": "#39C5CF",
"foreground": "#ADBAC7",
"green": "#3FB950",
"name": "GitHub Dark Dimmed",
"purple": "#BC8CFF",
"red": "#FF7B72",
"selectionBackground": "#264F78",
"white": "#ADBAC7",
"yellow": "#D29922"
}
],
"theme": "dark",
"themes": []
}

starship.toml

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
# Starship 极简风格配置
format = """
$os\
$env_var\
$directory\
$git_branch\
$git_status\
$python\
$conda\
$time\
$line_break\
$character"""

command_timeout = 1000

[os]
disabled = false
format = "[$symbol]($style) "
style = "bold white"

[os.symbols]
Windows = "󰍲"

[env_var.STARSHIP_USER]
format = "[$env_value]($style) "
style = "bold cyan"

[directory]
format = "[$path]($style)[$read_only]($read_only_style) "
style = "bold blue"
truncation_length = 3

[git_branch]
format = "[$symbol$branch]($style) "
symbol = " "
style = "bold purple"

[git_status]
format = "([$all_status$ahead_behind]($style) )"
style = "bold yellow"
conflicted = " "
ahead = "⇡${count}"
behind = "⇣${count}"
diverged = "⇕⇡${ahead_count}⇣${behind_count}"
untracked = " ${count} "
stashed = " ${count} "
modified = " ${count} "
staged = " ${count} "
renamed = " ${count} "
deleted = " ${count} "

[python]
format = "[$symbol($virtualenv )]($style)"
symbol = " "
style = "bold yellow"

[conda]
format = "[$symbol$environment]($style) "
symbol = " "
style = "bold green"
ignore_base = false

[time]
disabled = false
format = "[$time]($style) "
style = "dimmed white"
time_format = "%H:%M"

[character]
success_symbol = "[❯](bold green)"
error_symbol = "[❯](bold red)"

之后需要在 PowerShell profile 里启用 Starship,这里直接让 ai 操作就好