From 642c291b6fad3196b897b1a9f3e13ae688be1194 Mon Sep 17 00:00:00 2001 From: Taylor Silenzio Date: Tue, 3 Mar 2026 10:39:55 -0600 Subject: [PATCH] refactor: update shell, ghostty, bundles, and preferences - Rename zshrc.omz to defaults.zsh, add terminal title, LS_COLORS, syntax highlighting, and autosuggestions - Switch ghostty to onenord theme with frosted glass settings - Move pinentry to develop, zoom killall to personal/work - Add container, claude tools, gitbutler, claude-history - Sync mise config with live tools, disable top-left hot corner --- config/ghostty/config | 9 +- config/ghostty/themes/onenord | 28 ++++ config/mise/config.toml | 12 ++ config/zsh/{zshrc.omz => defaults.zsh} | 54 +++++- config/zsh/zshrc | 6 +- platforms/macos/bin/codesign-cert | 194 ++++++++++++++++++++++ platforms/macos/bundles/core/Brewfile | 5 +- platforms/macos/bundles/core/setup.sh | 3 - platforms/macos/bundles/develop/Brewfile | 9 + platforms/macos/bundles/develop/setup.sh | 6 +- platforms/macos/bundles/personal/setup.sh | 3 + platforms/macos/bundles/work/setup.sh | 3 + platforms/macos/preferences | 4 +- 13 files changed, 314 insertions(+), 22 deletions(-) create mode 100644 config/ghostty/themes/onenord rename config/zsh/{zshrc.omz => defaults.zsh} (90%) create mode 100755 platforms/macos/bin/codesign-cert diff --git a/config/ghostty/config b/config/ghostty/config index fbd6a34..676ba74 100644 --- a/config/ghostty/config +++ b/config/ghostty/config @@ -3,17 +3,24 @@ font-family = SauceCodePro Nerd Font font-size = 14 # Theme -theme = Catppuccin Mocha +theme = onenord # Cursor cursor-style = bar cursor-style-blink = false +cursor-color = #ffffff # Window +window-decoration = true window-padding-x = 12 window-padding-y = 12 +window-padding-color = background macos-titlebar-style = tabs window-save-state = always +background-opacity = 0.85 +background-blur-radius = 20 +mouse-hide-while-typing = true +window-theme = ghostty # macOS macos-option-as-alt = true diff --git a/config/ghostty/themes/onenord b/config/ghostty/themes/onenord new file mode 100644 index 0000000..e62ab9e --- /dev/null +++ b/config/ghostty/themes/onenord @@ -0,0 +1,28 @@ +# OneNord colorscheme for Ghostty terminal emulator. +# +# To use this theme, place this file in the .config/ghostty/themes directory and load is inside of your .config/ghostty/config file with: +# +# theme = onenord +# + +palette = 0=#3B4252 +palette = 1=#E06C75 +palette = 2=#9EC183 +palette = 3=#EBCB8B +palette = 4=#81A1C1 +palette = 5=#B988B0 +palette = 6=#88C0D0 +palette = 7=#E5E9F0 +palette = 8=#4C566A +palette = 9=#E06C75 +palette = 10=#9EC183 +palette = 11=#EBCB8B +palette = 12=#81A1C1 +palette = 13=#B988B0 +palette = 14=#8FBCBB +palette = 15=#ECEFF4 +background = 2E3440 +foreground = E5E9F0 +cursor-color = 3879C5 +selection-background = 3F4758 +selection-foreground = E5E9F0 diff --git a/config/mise/config.toml b/config/mise/config.toml index a0e9440..b60135f 100644 --- a/config/mise/config.toml +++ b/config/mise/config.toml @@ -8,6 +8,9 @@ not_found_auto_install = true # Trust config files in code directories without prompts trusted_config_paths = ["/Volumes/Code"] +[settings.ruby] +compile = false + [env] MISE_DEFAULT_CONFIG_FILENAME = "mise.local.toml" @@ -19,3 +22,12 @@ go = "latest" python = "latest" zig = "latest" lua = "latest" +uv = "latest" +java = "latest" +ruby = "latest" +dotnet = "latest" +gradle = "latest" +cmake = "latest" +cocogitto = "latest" +lefthook = "latest" +task = "latest" diff --git a/config/zsh/zshrc.omz b/config/zsh/defaults.zsh similarity index 90% rename from config/zsh/zshrc.omz rename to config/zsh/defaults.zsh index 195fee8..24f9dc3 100644 --- a/config/zsh/zshrc.omz +++ b/config/zsh/defaults.zsh @@ -1,11 +1,8 @@ # ============================================================================ -# Oh-My-Zsh Replacement Settings +# Shell Defaults # ============================================================================ -# This file contains all the settings that Oh-My-Zsh provides by default. -# Review each section and decide what you want to keep. -# -# To use: source this file from your main zshrc -# Usage: source ~/.dotfiles/zshrc.omz +# History, completion, keybindings, directory navigation, and aliases. +# Based on defaults from Oh-My-Zsh (https://github.com/ohmyzsh/ohmyzsh). # ============================================================================ # ============================================================================ @@ -42,7 +39,6 @@ setopt always_to_end # Move cursor to end of word after completion # Completion styling zstyle ':completion:*:*:*:*:*' menu select # Use arrow keys to navigate menu zstyle ':completion:*' matcher-list 'm:{[:lower:][:upper:]}={[:upper:][:lower:]}' 'r:|=*' 'l:|=* r:|=*' # Case-insensitive, partial-word, substring completion -zstyle ':completion:*' list-colors '' # Enable colored completion zstyle ':completion:*' special-dirs true # Complete . and .. directories zstyle ':completion:*' use-cache yes # Use cache for faster completions zstyle ':completion:*' cache-path ~/.zsh/cache # Cache location @@ -185,6 +181,37 @@ setopt auto_pushd # Push directories onto stack automatically setopt pushd_ignore_dups # Don't push duplicates onto stack setopt pushdminus # Swap meaning of +/- in directory stack +# ============================================================================ +# TERMINAL TITLE +# ============================================================================ +# Set tab/window title to current directory and running command +function _set_terminal_title_preexec() { + # Show running command in title + print -Pn "\e]2;${1:gs/%/%%}\a" +} +function _set_terminal_title_precmd() { + # Show current directory in title + print -Pn "\e]2;%~\a" +} +autoload -Uz add-zsh-hook +add-zsh-hook preexec _set_terminal_title_preexec +add-zsh-hook precmd _set_terminal_title_precmd + +# ============================================================================ +# COLORS +# ============================================================================ +# LS_COLORS for completion menu and ls fallback +export LSCOLORS="Gxfxcxdxbxegedabagacad" +export LS_COLORS="di=1;36:ln=35:so=32:pi=33:ex=31:bd=34;46:cd=34;43:su=30;41:sg=30;46:tw=30;42:ow=30;43" + +# Use LS_COLORS in completion menus +zstyle ':completion:*' list-colors "${(s.:.)LS_COLORS}" + +# Colored grep output +alias grep='grep --color=auto' +alias egrep='egrep --color=auto' +alias fgrep='fgrep --color=auto' + # ============================================================================ # MISCELLANEOUS SHELL OPTIONS # ============================================================================ @@ -483,5 +510,16 @@ alias gta='git tag -a' # Annotated tag export VIRTUAL_ENV_DISABLE_PROMPT=1 # ============================================================================ -# END OF OH-MY-ZSH REPLACEMENT SETTINGS +# ZSH PLUGINS (must be near end of file) +# ============================================================================ +# Autosuggestions (grey inline suggestions from history) +[[ -f /opt/homebrew/share/zsh-autosuggestions/zsh-autosuggestions.zsh ]] && \ + source /opt/homebrew/share/zsh-autosuggestions/zsh-autosuggestions.zsh + +# Syntax highlighting (green/red command validation — must be sourced last) +[[ -f /opt/homebrew/share/zsh-syntax-highlighting/zsh-syntax-highlighting.zsh ]] && \ + source /opt/homebrew/share/zsh-syntax-highlighting/zsh-syntax-highlighting.zsh + +# ============================================================================ +# END OF SHELL DEFAULTS # ============================================================================ diff --git a/config/zsh/zshrc b/config/zsh/zshrc index 29c71e8..9b05004 100644 --- a/config/zsh/zshrc +++ b/config/zsh/zshrc @@ -2,9 +2,9 @@ # Zsh Configuration # ============================================================================ -# Load Oh-My-Zsh replacement settings -if [[ -f ~/.dotfiles/config/zsh/zshrc.omz ]]; then - source ~/.dotfiles/config/zsh/zshrc.omz +# Load shell defaults (history, completion, keybindings, aliases) +if [[ -f ~/.dotfiles/config/zsh/defaults.zsh ]]; then + source ~/.dotfiles/config/zsh/defaults.zsh fi # ============================================================================ diff --git a/platforms/macos/bin/codesign-cert b/platforms/macos/bin/codesign-cert new file mode 100755 index 0000000..881a805 --- /dev/null +++ b/platforms/macos/bin/codesign-cert @@ -0,0 +1,194 @@ +#!/usr/bin/env bash +set -euo pipefail + +usage() { + cat < [--days ] + codesign-cert delete + +Manage self-signed code signing certificates in the login keychain. + +Creates a self-signed certificate with code signing EKU, imports it into +the login keychain, and sets the trust policy for codesigning. The resulting +identity can be used with codesign -s and SIGNING_IDENTITY in mise.local.toml. + +Source: https://github.com/tsilenzio/dotfiles/blob/main/platforms/macos/bin/codesign-cert + +Commands: + create Create a new certificate and import into keychain + delete Remove certificate and key from keychain + +Arguments: + name Signing identity name (used with codesign -s and SIGNING_IDENTITY) + +Options: + --days Validity period in days (default: 3650, ~10 years). Only for create. + --help Show this help message + +Examples: + codesign-cert create rune-keychain-dev + codesign-cert create my-tool-dev --days 7300 + codesign-cert delete rune-keychain-dev +EOF + exit 0 +} + +# --- Parse subcommand --- +COMMAND="${1:-}" + +case "$COMMAND" in + create|delete) shift ;; + --help|-h|"") usage ;; + -*) echo "error: unknown option: $COMMAND" >&2; echo "Run 'codesign-cert --help' for usage." >&2; exit 1 ;; + *) echo "error: unknown command: $COMMAND" >&2; echo "Run 'codesign-cert --help' for usage." >&2; exit 1 ;; +esac + +# --- Parse remaining arguments --- +NAME="" +DAYS=3650 + +while [[ $# -gt 0 ]]; do + case "$1" in + --days) + DAYS="${2:?--days requires a value}" + shift 2 + ;; + --help|-h) + usage + ;; + -*) + echo "error: unknown option: $1" >&2 + echo "Run 'codesign-cert --help' for usage." >&2 + exit 1 + ;; + *) + if [[ -n "$NAME" ]]; then + echo "error: unexpected argument: $1" >&2 + exit 1 + fi + NAME="$1" + shift + ;; + esac +done + +if [[ -z "$NAME" ]]; then + echo "error: certificate name is required" >&2 + echo "Run 'codesign-cert --help' for usage." >&2 + exit 1 +fi + +KEYCHAIN="$HOME/Library/Keychains/login.keychain-db" + +# --- Delete --- +if [[ "$COMMAND" == "delete" ]]; then + # Find all certificate hashes matching the name — delete by hash to avoid + # "ambiguous, matches more than one certificate" errors from duplicate certs. + HASHES=$(security find-certificate -a -c "$NAME" -Z "$KEYCHAIN" \ + | grep "SHA-1" | awk '{print $NF}') + + if [[ -z "$HASHES" ]]; then + echo "error: no certificates found matching \"$NAME\"" >&2 + exit 1 + fi + + COUNT=$(echo "$HASHES" | wc -l | tr -d ' ') + echo "Deleting $COUNT certificate(s) matching \"$NAME\"..." + + echo "$HASHES" | while read -r HASH; do + security delete-certificate -Z "$HASH" -t "$KEYCHAIN" + done + + echo "Done. Identity \"$NAME\" has been removed." + exit 0 +fi + +# --- Create --- + +# Check if identity already exists +if security find-identity -v -p codesigning | grep -q "\"$NAME\""; then + echo "error: signing identity \"$NAME\" already exists in keychain" >&2 + echo "hint: remove it first with: codesign-cert delete \"$NAME\"" >&2 + exit 1 +fi + +# Temp directory with cleanup +TMPDIR=$(mktemp -d) +trap 'rm -rf "$TMPDIR"' EXIT + +KEY="$TMPDIR/key.pem" +CERT="$TMPDIR/cert.pem" +P12="$TMPDIR/cert.p12" +CNF="$TMPDIR/openssl.cnf" + +# Generate RSA private key +echo "Generating private key..." +openssl genrsa -out "$KEY" 2048 2>/dev/null + +# Create openssl config with code signing extensions +cat > "$CNF" <&2 + echo "hint: check manually with: security find-identity -v -p codesigning" >&2 + exit 1 +fi diff --git a/platforms/macos/bundles/core/Brewfile b/platforms/macos/bundles/core/Brewfile index 1437055..5cd523b 100644 --- a/platforms/macos/bundles/core/Brewfile +++ b/platforms/macos/bundles/core/Brewfile @@ -8,6 +8,8 @@ brew "fzf" # Fuzzy finder brew "zoxide" # Smart cd replacement brew "broot" # Tree navigation and fuzzy finder brew "atuin" # Shell history sync +brew "zsh-syntax-highlighting" # Command validation highlighting +brew "zsh-autosuggestions" # Inline history suggestions # File Operations & Search brew "ripgrep" # Fast recursive search (rg) @@ -32,9 +34,6 @@ brew "coreutils" # GNU core utilities brew "age" # Modern encryption brew "sops" # Secrets management brew "gnupg" # GPG encryption -brew "pinentry-mac" # macOS pinentry for GPG -tap "jorgelbg/tap" -brew "jorgelbg/tap/pinentry-touchid" # Touch ID for GPG passphrase # Task Runner brew "just" # Command runner for justfile diff --git a/platforms/macos/bundles/core/setup.sh b/platforms/macos/bundles/core/setup.sh index 3c14074..a8457e3 100755 --- a/platforms/macos/bundles/core/setup.sh +++ b/platforms/macos/bundles/core/setup.sh @@ -22,9 +22,6 @@ echo "Installing core packages..." ## Install Brewfile install_brewfile "$BUNDLE_DIR/Brewfile" -# Kill apps that auto-launch after installation -killall "zoom.us" 2>/dev/null || true - ## Strip Gatekeeper quarantine from cask apps defined in loaded Brewfiles echo "" echo "Clearing quarantine flags..." diff --git a/platforms/macos/bundles/develop/Brewfile b/platforms/macos/bundles/develop/Brewfile index d896b81..176662f 100644 --- a/platforms/macos/bundles/develop/Brewfile +++ b/platforms/macos/bundles/develop/Brewfile @@ -3,12 +3,14 @@ cask_args no_quarantine: true # Taps tap "sijanc147/formulas" +tap "raine/claude-history" # Git & Version Control brew "gh" # GitHub CLI brew "git-delta" # Syntax-highlighting diff viewer brew "lazygit" # TUI for git operations brew "bfg" # Git repo cleaner +cask "gitbutler" # Git branch management # brew "tig" # Text-mode git interface (evaluate) # brew "git-extras" # Git utilities collection (evaluate) # brew "gitui" # Blazing fast git TUI (evaluate) @@ -42,6 +44,9 @@ brew "watchman" # File watcher (Meta) # brew "oha" # HTTP load testing (evaluate) # Security & Secrets +brew "pinentry-mac" # macOS pinentry for GPG +tap "jorgelbg/tap" +brew "jorgelbg/tap/pinentry-touchid" # Touch ID for GPG passphrase # brew "gitleaks" # Scan for secrets in repos (evaluate) # brew "trufflehog" # Find secrets in git history (evaluate) @@ -50,6 +55,7 @@ brew "mise" # Version manager brew "direnv" # Auto-load environment variables brew "shellcheck" # Shell script linter brew "docker" # Container CLI +brew "container" # Apple containerization (microVMs) brew "lima" # Linux VMs for macOS brew "hyperfine" # Command benchmarking # brew "tokei" # Code statistics (evaluate) @@ -79,8 +85,11 @@ brew "ctop" # Container monitoring # AI/LLM Tools brew "gemini-cli" # Google Gemini CLI +brew "raine/claude-history/claude-history" # Claude conversation history CLI cask "codex" # OpenAI Codex CLI cask "claude" # Anthropic Claude +cask "claude-devtools" # Claude developer tools +cask "claude-island" # Claude Island cask "chatgpt" # OpenAI ChatGPT # brew "mods" # Pipe-friendly AI (evaluate) # brew "fabric" # AI workflow patterns (evaluate) diff --git a/platforms/macos/bundles/develop/setup.sh b/platforms/macos/bundles/develop/setup.sh index bc24d62..8b64896 100755 --- a/platforms/macos/bundles/develop/setup.sh +++ b/platforms/macos/bundles/develop/setup.sh @@ -22,8 +22,10 @@ echo "Installing develop packages..." ## Install Brewfile install_brewfile "$BUNDLE_DIR/Brewfile" -# Kill apps that auto-launch after installation -killall "zoom.us" 2>/dev/null || true +# Fix pinentry-touchid symlink for Touch ID GPG signing +if command -v pinentry-touchid &>/dev/null; then + pinentry-touchid -fix +fi ## Configure symlinks (base configs) echo "" diff --git a/platforms/macos/bundles/personal/setup.sh b/platforms/macos/bundles/personal/setup.sh index 770d8eb..3da08a3 100755 --- a/platforms/macos/bundles/personal/setup.sh +++ b/platforms/macos/bundles/personal/setup.sh @@ -22,6 +22,9 @@ echo "Installing personal packages..." ## Install Brewfile install_brewfile "$BUNDLE_DIR/Brewfile" +# Kill apps that auto-launch after installation +killall "zoom.us" 2>/dev/null || true + ## Bundle-specific config overrides if [[ -d "$BUNDLE_DIR/config" ]]; then echo "" diff --git a/platforms/macos/bundles/work/setup.sh b/platforms/macos/bundles/work/setup.sh index d0b3791..411fbc7 100755 --- a/platforms/macos/bundles/work/setup.sh +++ b/platforms/macos/bundles/work/setup.sh @@ -22,6 +22,9 @@ echo "Installing work packages..." ## Install Brewfile install_brewfile "$BUNDLE_DIR/Brewfile" +# Kill apps that auto-launch after installation +killall "zoom.us" 2>/dev/null || true + ## Bundle-specific config overrides if [[ -d "$BUNDLE_DIR/config" ]]; then echo "" diff --git a/platforms/macos/preferences b/platforms/macos/preferences index ee262a3..9678500 100755 --- a/platforms/macos/preferences +++ b/platforms/macos/preferences @@ -105,8 +105,8 @@ defaults write com.apple.WindowManager EnableStandardClickToShowDesktop -bool fa # Group windows by application (Expose) defaults write com.apple.dock expose-group-apps -bool true -# Enable drag windows to top for Mission Control -defaults write com.apple.dock wvous-tl-corner -int 2 +# Disable top-left hot corner (no action) +defaults write com.apple.dock wvous-tl-corner -int 0 defaults write com.apple.dock wvous-tl-modifier -int 0 ## Displays