1113 字
6 分钟
Ghostty 配置

Ghostty 配置#

安装 Ghostty

https://ghostty.org/download

Shader#

shader 收集 https://catskull.net/fun-with-ghostty-shaders.html

光标动画 shader https://github.com/KroneCorylus/ghostty-shader-playground/blob/main/public/shaders/cursor_smear.glsl

Ghostty 终端配置#

~/.config/ghostty/config
# Config generated by Ghostty Config
window-height = 24
window-width = 96
# custom-shader = ~/.config/ghostty/shaders/bettercrt.glsl
custom-shader = ~/.config/ghostty/shaders/cursor_smear.glsl
# custom-shader = ~/.config/ghostty/shaders/cursor_blaze.glsl
font-size = 17
# Nerd Font(tmux 状态栏图标需要,系统已安装 SFMono Nerd Font)
font-family = "SFMono Nerd Font"
macos-titlebar-style = tabs
macos-titlebar-proxy-icon = hidden
window-show-tab-bar = never
background-opacity = 0.8
background-blur = true
background-blur-radius = 11
theme = Catppuccin Mocha
background = #1e1e2e
33 collapsed lines
foreground = #cdd6f4
selection-background = #585b70
selection-foreground = #cdd6f4
cursor-color = #f5e0dc
cursor-text = #1e1e2e
palette = 0=#45475a
palette = 1=#f38ba8
palette = 2=#a6e3a1
palette = 3=#f9e2af
palette = 4=#89b4fa
palette = 5=#f5c2e7
palette = 6=#94e2d5
palette = 7=#a6adc8
palette = 8=#585b70
palette = 9=#f37799
palette = 10=#89d88b
palette = 11=#ebd391
palette = 12=#74a8fc
palette = 13=#f2aede
palette = 14=#6bd7ca
palette = 15=#bac2de
window-padding-y = 10
unfocused-split-opacity = 0.89
split-divider-color = #ffffff
macos-option-as-alt = true
macos-window-shadow = false
# 左右内边距(x轴)
window-padding-x = 12
# 上下内边距(y轴)
window-padding-y = 12

Oh-My-Zsh#

Terminal window

starship 配置#

参考: https://starship.rs/

效果

Terminal window
< ☁️ > ~
❯

安装 starship#

Terminal window
# 安装 starship
curl -sS https://starship.rs/install.sh | sh
# 将下面的命令添加到 ~/.zshrc:
eval "$(starship init zsh)"

配置#

~/.config/starship.toml
"$schema" = 'https://starship.rs/config-schema.json'
# Move the directory to the second line
format = '''< ☁️ > $all'''
[aws]
symbol = " "
[buf]
symbol = " "
[bun]
symbol = " "
[c]
symbol = " "
[cpp]
symbol = " "
188 collapsed lines
[cmake]
symbol = " "
[conda]
symbol = " "
[crystal]
symbol = " "
[dart]
symbol = " "
[deno]
symbol = " "
[directory]
read_only = " 󰌾"
[docker_context]
symbol = " "
[elixir]
symbol = " "
[elm]
symbol = " "
[fennel]
symbol = " "
[fortran]
symbol = " "
[fossil_branch]
symbol = " "
[gcloud]
symbol = " "
[git_branch]
symbol = " "
[git_commit]
tag_symbol = '  '
[golang]
symbol = " "
[gradle]
symbol = " "
[guix_shell]
symbol = " "
[haskell]
symbol = " "
[haxe]
symbol = " "
[hg_branch]
symbol = " "
[hostname]
ssh_symbol = " "
[java]
symbol = " "
[julia]
symbol = " "
[kotlin]
symbol = " "
[lua]
symbol = " "
[memory_usage]
symbol = "󰍛 "
[meson]
symbol = "󰔷 "
[nim]
symbol = "󰆥 "
[nix_shell]
symbol = " "
[nodejs]
symbol = " "
[ocaml]
symbol = " "
[os.symbols]
Alpaquita = " "
Alpine = " "
AlmaLinux = " "
Amazon = " "
Android = " "
AOSC = " "
Arch = " "
Artix = " "
CachyOS = " "
CentOS = " "
Debian = " "
DragonFly = " "
Elementary = " "
Emscripten = " "
EndeavourOS = " "
Fedora = " "
FreeBSD = " "
Garuda = "󰛓 "
Gentoo = " "
HardenedBSD = "󰞌 "
Illumos = "󰈸 "
Ios = "󰀷 "
Kali = " "
Linux = " "
Mabox = " "
Macos = " "
Manjaro = " "
Mariner = " "
MidnightBSD = " "
Mint = " "
NetBSD = " "
NixOS = " "
Nobara = " "
OpenBSD = "󰈺 "
openSUSE = " "
OracleLinux = "󰌷 "
Pop = " "
Raspbian = " "
Redhat = " "
RedHatEnterprise = " "
RockyLinux = " "
Redox = "󰀘 "
Solus = "󰠳 "
SUSE = " "
Ubuntu = " "
Unknown = " "
Void = " "
Windows = "󰍲 "
Zorin = " "
[package]
symbol = "󰏗 "
[perl]
symbol = " "
[php]
symbol = " "
[pijul_channel]
symbol = " "
[pixi]
symbol = "󰏗 "
[python]
symbol = " "
[rlang]
symbol = "󰟔 "
[ruby]
symbol = " "
[rust]
symbol = "󱘗 "
[scala]
symbol = " "
[status]
symbol = " "
[swift]
symbol = " "
[xmake]
symbol = " "
[zig]
symbol = " "

Tmux 配置#

插件:https://github.com/catppuccin/tmux

Terminal window
# 一键安装
mkdir -p ~/.config/tmux/plugins/catppuccin
git clone -b v2.3.0 https://github.com/catppuccin/tmux.git ~/.config/tmux/plugins/catppuccin/tmux
~/.tmux.conf
# ============================================================
# 基础配置
# ============================================================
set -g mouse on
# 状态栏顶部
set -g status-position top
# 状态栏本身继承 Kitty 背景
set -g status-style "fg=default,bg=default"
set -g status-left-style "fg=default,bg=default"
set -g status-right-style "fg=default,bg=default"
# 给左右模块足够长度,防止内容被截断
set -g status-left-length 100
set -g status-right-length 100
# 刷新频率
set -g status-interval 5
121 collapsed lines
# ============================================================
# Catppuccin
# ============================================================
set -g @catppuccin_flavor "mocha"
set -g @catppuccin_status_background "none"
run-shell ~/.tmux/plugins/catppuccin/catppuccin.tmux
# ============================================================
# 最终配色
#
# 胶囊深色部分不要纯黑:
#
# dark = #313244
# text = #cdd6f4
# green = #a6e3a1
# peach = #fab387
# pink = #f5c2e7
# inactive index = #9399b2
# ============================================================
# ============================================================
# 左胶囊
#
# (绿短 | 深灰长)
#
# [  | session ]
#
# 左右各保留 1 格 padding
# ============================================================
set -g status-left "\
#[fg=#a6e3a1,bg=default]\
#[fg=#11111b,bg=#a6e3a1] \
#[fg=#cdd6f4,bg=#313244] #S\
#[fg=#313244,bg=default]\
"
# ============================================================
# Window / Tab
#
# 每个 Tab 之间只留一个空格
# ============================================================
set -g window-status-separator " "
# 清除 Catppuccin 自己残留的 window 样式
set -g window-status-style "fg=default,bg=default"
set -g window-status-current-style "fg=default,bg=default"
# ============================================================
# 当前 Tab
#
# (深灰长 | 橙短)
#
# [ zsh | 0 ]
#
# #W 左右各 1 格
# #I 左右各 1 格
# ============================================================
set -g window-status-current-format "\
#[fg=#313244,bg=default]\
#[fg=#cdd6f4,bg=#313244]#W \
#[fg=#11111b,bg=#fab387] #I\
#[fg=#fab387,bg=default]"
# ============================================================
# 非当前 Tab
#
# (深灰长 | 灰蓝短)
#
# 当前窗口用橙色,非当前窗口弱化
# ============================================================
set -g window-status-format "\
#[fg=#313244,bg=default]\
#[fg=#cdd6f4,bg=#313244]#W \
#[fg=#11111b,bg=#9399b2] #I\
#[fg=#9399b2,bg=default]"
# ============================================================
# 右胶囊
#
# (粉短 | 深灰长)
#
# [ folder | directory ]
#
# 只显示当前目录 basename
#
# /Users/cloudsir/project
# ->
# project
# ============================================================
set -g status-right "\
#[fg=#f5c2e7,bg=default]\
#[fg=#11111b,bg=#f5c2e7] \
#[fg=#cdd6f4,bg=#313244] #{b:pane_current_path}\
#[fg=#313244,bg=default]"
# ============================================================
# Window 名称
# ============================================================
# 允许 tmux 根据程序自动命名:
# zsh / nvim / vim / ssh 等
set -g automatic-rename on
# 防止 shell / Kitty 把 hostname 强行写进 window name
set -g allow-rename offj
Ghostty 配置
https://blog.cloudsir.top/posts/ghostty/
作者
CloudSir
发布于
2026-08-27
许可协议
CC BY-NC-SA 4.0
赞一下 正在读取点赞
相机是如何拍出彩色照片的:从 CFA 阵列到 Debayer算法
摄影集 · 蓝

下拉加载评论