From 3cba307a6f53e794680c8eb23b02322269cd7125 Mon Sep 17 00:00:00 2001 From: Li Tang Date: Tue, 31 Mar 2026 12:19:31 +0800 Subject: [PATCH] feat: add ghostty Signed-off-by: Li Tang --- .zshrc | 1 + Brewfile | 1 + ghostty/config | 75 ++++++++++++++++++++++++++++++++++++++++++++++++-- setup.sh | 30 ++++++++++++++++---- 4 files changed, 100 insertions(+), 7 deletions(-) diff --git a/.zshrc b/.zshrc index 1d74f8f..79a0c6f 100644 --- a/.zshrc +++ b/.zshrc @@ -327,6 +327,7 @@ alias pip='pip3' alias sed='gsed' alias grep='ggrep' alias tailscale="/Applications/Tailscale.app/Contents/MacOS/Tailscale" +alias ghostty='/Applications/Ghostty.app/Contents/MacOS/ghostty' alias cc='claude --append-system-prompt-file ~/.config/opencode/AGENTS.md --model claude-opus-4.6' alias oc='opencode' diff --git a/Brewfile b/Brewfile index 9420f26..6c80e90 100644 --- a/Brewfile +++ b/Brewfile @@ -80,6 +80,7 @@ cask "feishu" cask "font-jetbrains-mono-nerd-font" cask "font-maple-mono-nf-cn" cask "google-chrome" +cask "ghostty" cask "jordanbaird-ice" cask "kiro" cask "kiro-cli" diff --git a/ghostty/config b/ghostty/config index 54abaa0..8aeb87f 100644 --- a/ghostty/config +++ b/ghostty/config @@ -1,3 +1,74 @@ -font-family = "JetBrainsMono Nerd Font Mono" -theme = "tokyonight" +# vim: set filetype=toml : +# ============================================ +# Ghostty Terminal Configuration +# ============================================ +# File: ~/.config/ghostty/config +# Reload: Cmd+Shift+, +# View options: ghostty +show-config --default --docs +# --- Typography --- +font-family = "JetBrainsMono Nerd Font Mono" +font-size = 13 +font-thicken = true +adjust-cell-height = 2 + +# --- Theme and Colors --- +theme = Catppuccin Mocha + +# --- Window and Appearance --- +background-opacity = 0.9 +background-blur-radius = 20 +macos-titlebar-style = transparent +window-padding-x = 10 +window-padding-y = 8 +window-save-state = always +window-theme = auto + +# --- Cursor --- +cursor-style = bar +cursor-style-blink = true +cursor-opacity = 0.8 + +# --- Mouse --- +mouse-hide-while-typing = true +copy-on-select = clipboard + +# --- Quick Terminal (Quake-style dropdown) --- +quick-terminal-position = top +quick-terminal-screen = mouse +quick-terminal-autohide = true +quick-terminal-animation-duration = 0.15 + +# --- Security --- +clipboard-paste-protection = true +clipboard-paste-bracketed-safe = true + +# --- Shell Integration --- +shell-integration = detect + +# --- Keybindings --- +keybind = cmd+t=new_tab +keybind = cmd+alt+h=previous_tab +keybind = cmd+alt+l=next_tab +keybind = cmd+w=close_surface + +keybind = cmd+d=new_split:right +keybind = cmd+shift+d=new_split:down +keybind = cmd+shift+h=goto_split:left +keybind = cmd+shift+j=goto_split:bottom +keybind = cmd+shift+k=goto_split:top +keybind = cmd+shift+l=goto_split:right + +keybind = global:ctrl+grave_accent=toggle_quick_terminal +keybind = cmd+shift+e=equalize_splits +keybind = cmd+shift+f=toggle_split_zoom +keybind = cmd+shift+comma=reload_config + +keybind = cmd+plus=increase_font_size:1 +keybind = cmd+minus=decrease_font_size:1 +keybind = cmd+zero=reset_font_size + +# --- Performance --- +scrollback-limit = 25000000 + +confirm-close-surface = false diff --git a/setup.sh b/setup.sh index 4c88e8b..1d2b5a3 100755 --- a/setup.sh +++ b/setup.sh @@ -578,7 +578,7 @@ function cmd_check() { print_success "installed ($(brew --version | head -1))" else print_error "not found" - ((missing++)) + missing=$((missing + 1)) fi # Check zsh @@ -587,7 +587,7 @@ function cmd_check() { print_success "installed ($(zsh --version))" else print_error "not found" - ((missing++)) + missing=$((missing + 1)) fi # Check Neovim @@ -596,7 +596,7 @@ function cmd_check() { print_success "installed ($(nvim --version | head -1))" else print_error "not found" - ((missing++)) + missing=$((missing + 1)) fi # Check tmux @@ -605,7 +605,7 @@ function cmd_check() { print_success "installed ($(tmux -V))" else print_error "not found" - ((missing++)) + missing=$((missing + 1)) fi # Check antigen @@ -614,7 +614,7 @@ function cmd_check() { print_success "installed" else print_error "not found" - ((missing++)) + missing=$((missing + 1)) fi # Check symlinks @@ -633,6 +633,26 @@ function cmd_check() { print_warning "exists but not linked" else print_error "not found" + missing=$((missing + 1)) + fi + done + + echo "" + echo "Config Links:" + for i in "${CONFIG_FILES[@]}"; do + echo -n " .config/$i: " + if [ -L "$HOME_DIR/.config/$i" ]; then + local target=$(readlink "$HOME_DIR/.config/$i") + if [[ "$target" == *"$WORKING_DIR"* ]]; then + print_success "linked to dotfiles" + else + print_warning "linked elsewhere: $target" + fi + elif [ -e "$HOME_DIR/.config/$i" ]; then + print_warning "exists but not linked" + else + print_error "not found" + missing=$((missing + 1)) fi done