Skip to content

Commit 5676d5f

Browse files
committed
chore(setup): init mkdocs and first post
1 parent 9d4de7a commit 5676d5f

File tree

12 files changed

+248
-1
lines changed

12 files changed

+248
-1
lines changed

.gitignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
.DS_Store
2+
.trash/
13
.venv/
24
.uv-cache/
35
__pycache__/

docs/about.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
---
2+
hide:
3+
- navigation
4+
---
5+
6+
# About Me
7+

docs/blog/index.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
# Blog
82.2 KB
Loading
51.7 KB
Loading
Lines changed: 157 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,157 @@
1+
---
2+
date: 2025-11-03
3+
categories:
4+
- Vibe Coding
5+
- Setup
6+
---
7+
8+
# Mac 终端终极配置指南
9+
10+
1. 快速的终端体验 -> Ghostty
11+
2. 让眼睛愉悦的审美 -> catppuccin
12+
3. 个性化终端显示 -> starship
13+
4. 终端命令补全及高亮 -> zsh-autosuggestions
14+
15+
![](assets/ultimate-mac-terminal-setup/final-look.png){ width="70%" }
16+
17+
<!-- more -->
18+
19+
## 安装
20+
21+
```shell
22+
brew install --cask ghostty # 终端
23+
brew install starship # 终端自定义
24+
brew install font-meslo-lg-nerd-font # 图标字体支持
25+
brew install zsh-autosuggestions # 终端命令自动提示及补全
26+
brew install zsh-syntax-highlighting # 终端语法高亮
27+
```
28+
29+
追加如下命令到`~/.zshrc`末尾:
30+
31+
```shell
32+
source /opt/homebrew/share/zsh-autosuggestions/zsh-autosuggestions.zsh
33+
source $(brew --prefix)/share/zsh-syntax-highlighting/zsh-syntax-highlighting.zsh
34+
eval "$(starship init zsh)"
35+
```
36+
37+
## 🍉starship
38+
39+
我的配置主要参照[官方配置说明](https://starship.rs/config/)并结合[catppuccin](https://github.com/catppuccin/starship/blob/main/starship.toml)的审美调教。首先运行如下命令创建配置文件。
40+
41+
```shell
42+
mkdir -p ~/.config && touch ~/.config/starship.toml
43+
```
44+
45+
具体配置方面 : )
46+
47+
- 采用mocha配色主题
48+
- 取消了命令行前缀变色的逻辑(无效信息)
49+
- 命令行显示针对超长路径进行优化,只显示最后2层的完整路径,前缀路径只显示第一个字母
50+
- 关闭了一些关于username/hostname/package version等的显示
51+
52+
```toml
53+
"$schema" = 'https://starship.rs/config-schema.json'
54+
palette = "catppuccin_mocha"
55+
add_newline = true
56+
57+
[git_branch]
58+
style = "bold mauve"
59+
60+
[directory]
61+
format = "[$path]($style) "
62+
style = "bold lavender"
63+
64+
# 借鉴 p10k “shortened”:除最后一段外,每段取前 N 个字符
65+
fish_style_pwd_dir_length = 1 # 1=首字母,2=前两字母…
66+
truncation_length = 2 # 最多显示 n 段
67+
truncation_symbol = "…/" # 省略号样式
68+
truncate_to_repo = true # 进入仓库后从仓库根开始计数
69+
home_symbol = "~" # 家目录符号
70+
71+
[username]
72+
disabled = true
73+
[hostname]
74+
disabled = true
75+
[time]
76+
disabled = true
77+
[package]
78+
disabled = true
79+
[nodejs]
80+
disabled = true
81+
[python]
82+
disabled = true
83+
[gcloud]
84+
disabled = true
85+
86+
[palettes.catppuccin_mocha]
87+
rosewater = "#f5e0dc"
88+
flamingo = "#f2cdcd"
89+
pink = "#f5c2e7"
90+
mauve = "#cba6f7"
91+
red = "#f38ba8"
92+
maroon = "#eba0ac"
93+
peach = "#fab387"
94+
yellow = "#f9e2af"
95+
green = "#a6e3a1"
96+
teal = "#94e2d5"
97+
sky = "#89dceb"
98+
sapphire = "#74c7ec"
99+
blue = "#89b4fa"
100+
lavender = "#b4befe"
101+
text = "#cdd6f4"
102+
subtext1 = "#bac2de"
103+
subtext0 = "#a6adc8"
104+
overlay2 = "#9399b2"
105+
overlay1 = "#7f849c"
106+
overlay0 = "#6c7086"
107+
surface2 = "#585b70"
108+
surface1 = "#45475a"
109+
surface0 = "#313244"
110+
base = "#1e1e2e"
111+
mantle = "#181825"
112+
crust = "#11111b"
113+
```
114+
115+
## Ghostty
116+
117+
创建配置文件夹及配置文件。
118+
119+
```shell
120+
mkdir -p ~/.config/ghostty/themes && touch ~/.config/ghostty/config
121+
```
122+
123+
下载 [catppuccin主题文件](https://github.com/catppuccin/ghostty/tree/main/themes)`~/.config/ghostty/themes` 路径中,配置`~/.config/ghostty/config` 文件。
124+
125+
```
126+
theme = catppuccin-mocha.conf
127+
128+
font-family = MesloLGS Nerd Font Mono
129+
font-size = 24
130+
window-width = 90
131+
window-height = 30
132+
background-opacity = 0.99
133+
134+
keybind = shift+enter=text:\n
135+
keybind = global:cmd+backslash=toggle_visibility
136+
# keybind = cmd+shift+comma=reload_config
137+
138+
# cursor settings
139+
cursor-style = block
140+
cursor-style-blink = false
141+
cursor-color = #40a02b
142+
cursor-text = #000000
143+
shell-integration-features = no-cursor
144+
```
145+
146+
到此配置结束,启动你的ghostty看看效果吧!
147+
148+
![](assets/ultimate-mac-terminal-setup/final-look-2.png){ width="50%" }
149+
## Tips
150+
151+
- **命令部分补全**,使用 `->` 可以完整接受命令补全结果,使用`option + ->`可移动光标进行部分补全
152+
153+
- **Ghostty远程连接按键错位**,ghostty在ssh连接remote server可能会出现按键错位,将 `user@server` 替换后在执行:
154+
```shell
155+
infocmp -x xterm-ghostty | ssh user@server -- 'tic -x -o ~/.terminfo -'
156+
```
157+
- Ghostty窗口重命名,这个在使用Git worktree配合 Claude Code等Coding Agent Cli时特别有用,首先通过`command + shift + p`招出命令搜索界面,输入`title`就可以看到`change title`的命令了,然后重命名即可!

docs/index.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,8 @@
1+
---
2+
hide:
3+
- navigation
4+
---
5+
16
# Welcome to MkDocs
27

38
For full documentation visit [mkdocs.org](https://www.mkdocs.org).

docs/kaggle/index.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
# Kaggle

docs/kaggle/project-a.md

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
# Project A
2+
3+
A demonstration project showcasing my work.
4+
5+
## Overview
6+
7+
This project explores interesting concepts and implementations.
8+
9+
## Technologies Used
10+
11+
- Python
12+
- JavaScript
13+
- Docker
14+
15+
## Links
16+
17+
- GitHub Repository
18+
- Live Demo

docs/kaggle/project-b.md

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
# Project B
2+
3+
Another exciting project I've been working on.
4+
5+
## Overview
6+
7+
This project focuses on solving real-world problems.
8+
9+
## Features
10+
11+
- Feature 1
12+
- Feature 2
13+
- Feature 3
14+
15+
## Status
16+
17+
Currently in active development.

0 commit comments

Comments
 (0)