diff --git a/.gitignore b/.gitignore index a01b5a4..b5a81d5 100644 --- a/.gitignore +++ b/.gitignore @@ -1 +1,2 @@ nvim/.config/nvim/plugin/packer_compiled.lua +zsh/.zshrc.local diff --git a/.gitmodules b/.gitmodules new file mode 100644 index 0000000..00f5123 --- /dev/null +++ b/.gitmodules @@ -0,0 +1,3 @@ +[submodule "tmux/.config/tmux/plugins/catppuccin/tmux"] + path = tmux/.config/tmux/plugins/catppuccin/tmux + url = https://github.com/catppuccin/tmux.git diff --git a/CLAUDE.md b/CLAUDE.md index 8c4cf61..b67e230 100644 --- a/CLAUDE.md +++ b/CLAUDE.md @@ -9,7 +9,7 @@ macOS dotfiles managed with [GNU Stow](https://www.gnu.org/software/stow/). Each Each directory mirrors the target path relative to `$HOME`: - **XDG configs** nest under `.config/`: `nvim/.config/nvim/`, `tmux/.config/tmux/`, `alacritty/.config/alacritty/` -- **Home-root configs** place dotfiles directly: `skhd/.skhdrc`, `yabai/.yabairc`, `zsh/.zshrc` +- **Home-root configs** place dotfiles directly: `skhd/.skhdrc`, `yabai/.yabairc` - **Scripts** go in `bin/.local/bin/` ## Setup @@ -22,7 +22,7 @@ brew install stow git clone ~/dotfiles && cd ~/dotfiles # Stow all packages -stow alacritty bin nvim skhd tmux yabai zsh +stow bin ghostty nvim skhd starship tmux yabai # Or stow a single package stow nvim @@ -57,10 +57,10 @@ Plugin configs live in `nvim/.config/nvim/lua/drewjs/plugins/`. ## Key Tools -- **alacritty** — terminal emulator (Catppuccin Mocha theme, BerkeleyMono font) +- **ghostty** — terminal emulator (Catppuccin Macchiato theme, BerkeleyMono font) - **nvim** — editor with lazy.nvim, LSP, Telescope, Treesitter, Harpoon -- **tmux** — terminal multiplexer with custom statusline +- **tmux** — terminal multiplexer with Catppuccin Macchiato statusline (catppuccin/tmux plugin) +- **starship** — shell prompt - **skhd** — macOS hotkey daemon - **yabai** — macOS tiling window manager -- **zsh** — shell config with Oh-My-Zsh, fzf, ripgrep - **bin** — custom scripts (`tmux-sessionizer`, `present`/`unpresent`, etc.) diff --git a/ghostty/.config/ghostty/config b/ghostty/.config/ghostty/config index 06f444a..79e86f4 100644 --- a/ghostty/.config/ghostty/config +++ b/ghostty/.config/ghostty/config @@ -10,12 +10,12 @@ font-thicken = false adjust-cell-height = 2 # ── Theme ───────────────────────────────────────────── -theme = Catppuccin Mocha +theme = Catppuccin Macchiato alpha-blending = linear-corrected window-colorspace = display-p3 # ── Window ──────────────────────────────────────────── -background-opacity = 0.85 +background-opacity = 1 background-blur = true macos-titlebar-style = tabs macos-option-as-alt = true diff --git a/starship/.config/starship.toml b/starship/.config/starship.toml new file mode 100644 index 0000000..a3fc107 --- /dev/null +++ b/starship/.config/starship.toml @@ -0,0 +1,29 @@ +"$schema" = 'https://starship.rs/config-schema.json' + +format = "$directory$all" + +[character] +error_symbol = "[❯](bold red)" +success_symbol = "[❯](bold green)" + +[directory] +truncate_to_repo = false + +[git_branch] +symbol = " " +truncation_length = 32 + +[golang] +symbol = " " + +[lua] +symbol = " " + +[nodejs] +symbol = " " + +[package] +disabled = true + +[buf] +disabled = true diff --git a/tmux/.config/tmux/catppuccin.conf b/tmux/.config/tmux/catppuccin.conf new file mode 100644 index 0000000..8835199 --- /dev/null +++ b/tmux/.config/tmux/catppuccin.conf @@ -0,0 +1,41 @@ +# vim: ft=tmux + +# flavor + plugin options (BEFORE run) +set -g @catppuccin_flavor 'macchiato' +set -g @catppuccin_window_status_style "none" +set -g @catppuccin_status_background "none" + +# square module separators (no powerline glyphs) +set -g @catppuccin_status_left_separator "" +set -g @catppuccin_status_middle_separator "" +set -g @catppuccin_status_right_separator "" +set -g @catppuccin_status_connect_separator "no" +set -g @catppuccin_status_module_text_bg "#{@thm_surface_0}" + +# add left padding to icons, right padding to text +set -g @catppuccin_directory_icon "  " +set -g @catppuccin_session_icon "  " +set -g @catppuccin_directory_text " #{b:pane_current_path} " +set -g @catppuccin_session_text " #S " + +run ~/.config/tmux/plugins/catppuccin/tmux/catppuccin.tmux + +# reset leftover styles from previous configs (Rose Pine remnants) +set -g status-bg default +set -g window-status-style "default" +set -g window-status-current-style "default" + +# status bar layout (AFTER run) +set -g status-position top +set -g status-justify left +set -g status-left "" +set -g status-left-length 0 +set -g status-right-length 140 + +# right: directory + session +set -g status-right "#{E:@catppuccin_status_directory}" +set -ag status-right "#{E:@catppuccin_status_session}" + +# window tabs — manual formatting (plugin "none" mode) +set -g window-status-format "#[fg=#{@thm_overlay_2}] #I #W " +set -g window-status-current-format "#[fg=#{@thm_crust},bg=#{@thm_lavender}] #I #[fg=#{@thm_text},bg=#{@thm_surface_0}] #W " diff --git a/tmux/.config/tmux/plugins/catppuccin/tmux b/tmux/.config/tmux/plugins/catppuccin/tmux new file mode 160000 index 0000000..b2f219c --- /dev/null +++ b/tmux/.config/tmux/plugins/catppuccin/tmux @@ -0,0 +1 @@ +Subproject commit b2f219c00609ea1772bcfbdae0697807184743e4 diff --git a/tmux/.config/tmux/tmux.conf b/tmux/.config/tmux/tmux.conf index 54225ff..f3f55a0 100644 --- a/tmux/.config/tmux/tmux.conf +++ b/tmux/.config/tmux/tmux.conf @@ -1,6 +1,8 @@ # settings -set -g default-terminal "screen-256color" -set -ag terminal-overrides ",xterm-256color:RGB" +set -g default-terminal "tmux-256color" +set -g extended-keys on +set -ga terminal-features "xterm*:extkeys" +set -ga terminal-features "xterm-ghostty:extkeys" set -g focus-events on set -g base-index 1 @@ -8,10 +10,12 @@ setw -g pane-base-index 1 set -g renumber-windows on set -g detach-on-destroy off -set -g history-limit 10000 +set -g history-limit 50000 set -g set-clipboard on -set -g escape-time 1 +set -g escape-time 0 set -g mouse on +set -g display-time 4000 +set -g aggressive-resize on # keybinds @@ -27,21 +31,43 @@ set -g prefix C-a bind-key C-a send-prefix unbind % -bind \\ split-window -h +bind \\ split-window -h -c "#{pane_current_path}" unbind '"' -bind - split-window -v +bind Enter split-window -v -c "#{pane_current_path}" + +bind c new-window -c "#{pane_current_path}" unbind r bind-key r source-file ~/.config/tmux/tmux.conf \; display-message ".tmux.conf reloaded" +# pane resize +bind -r - resize-pane -D 5 +bind -r = resize-pane -U 5 +bind -r [ resize-pane -L 5 +bind -r ] resize-pane -R 5 +bind DC select-layout tiled + +# kill pane without confirm +bind x kill-pane + # enable vi keys setw -g mode-keys vi + +# copy mode +bind v copy-mode bind-key -T copy-mode-vi 'v' send -X begin-selection -bind-key -T copy-mode-vi 'y' send -X copy-selection +bind-key -T copy-mode-vi 'V' send -X select-line +bind-key -T copy-mode-vi 'C-v' send -X rectangle-toggle +bind-key -T copy-mode-vi 'y' send -X copy-pipe-and-cancel "pbcopy" +bind-key -T copy-mode-vi 'Escape' send -X clear-selection unbind -T copy-mode-vi MouseDragEnd1Pane +bind-key -T copy-mode-vi MouseDragEnd1Pane send -X copy-pipe-and-cancel "pbcopy" + +# shift+enter → C-j +bind -n S-Enter send-keys C-j # sessionizer bind-key -r f run-shell "tmux neww ~/.local/bin/tmux-sessionizer" -source ~/.config/tmux/statusline.conf +source ~/.config/tmux/catppuccin.conf diff --git a/zsh/.zsh_profile b/zsh/.zsh_profile deleted file mode 100644 index a2d1093..0000000 --- a/zsh/.zsh_profile +++ /dev/null @@ -1 +0,0 @@ -bindkey -s ^f "tmux-sessionizer\n" diff --git a/zsh/.zshrc b/zsh/.zshrc index 34b880e..e79fbe5 100644 --- a/zsh/.zshrc +++ b/zsh/.zshrc @@ -1,132 +1,60 @@ -# If you come from bash you might have to change your $PATH. -# export PATH=$HOME/bin:/usr/local/bin:$PATH - -# Path to your oh-my-zsh installation. -export ZSH="$HOME/.oh-my-zsh" - -# Set name of the theme to load --- if set to "random", it will -# load a random theme each time oh-my-zsh is loaded, in which case, -# to know which specific one was loaded, run: echo $RANDOM_THEME -# See https://github.com/ohmyzsh/ohmyzsh/wiki/Themes -if [[ "$TERM_PROGRAM" == "vscode" ]]; then - ZSH_THEME="" # Disable theme for Cursor -else - ZSH_THEME="robbyrussell" -fi - -# Set list of themes to pick from when loading at random -# Setting this variable when ZSH_THEME=random will cause zsh to load -# a theme from this variable instead of looking in $ZSH/themes/ -# If set to an empty array, this variable will have no effect. -# ZSH_THEME_RANDOM_CANDIDATES=( "robbyrussell" "agnoster" ) - -# Uncomment the following line to use case-sensitive completion. -# CASE_SENSITIVE="true" - -# Uncomment the following line to use hyphen-insensitive completion. -# Case-sensitive completion must be off. _ and - will be interchangeable. -# HYPHEN_INSENSITIVE="true" - -# Uncomment one of the following lines to change the auto-update behavior -# zstyle ':omz:update' mode disabled # disable automatic updates -# zstyle ':omz:update' mode auto # update automatically without asking -# zstyle ':omz:update' mode reminder # just remind me to update when it's time - -# Uncomment the following line to change how often to auto-update (in days). -# zstyle ':omz:update' frequency 13 - -# Uncomment the following line if pasting URLs and other text is messed up. -# DISABLE_MAGIC_FUNCTIONS="true" - -# Uncomment the following line to disable colors in ls. -# DISABLE_LS_COLORS="true" - -# Uncomment the following line to disable auto-setting terminal title. -# DISABLE_AUTO_TITLE="true" - -# Uncomment the following line to enable command auto-correction. -# ENABLE_CORRECTION="true" - -# Uncomment the following line to display red dots whilst waiting for completion. -# You can also set it to another string to have that shown instead of the default red dots. -# e.g. COMPLETION_WAITING_DOTS="%F{yellow}waiting...%f" -# Caution: this setting can cause issues with multiline prompts in zsh < 5.7.1 (see #5765) -# COMPLETION_WAITING_DOTS="true" - -# Uncomment the following line if you want to disable marking untracked files -# under VCS as dirty. This makes repository status check for large repositories -# much, much faster. -# DISABLE_UNTRACKED_FILES_DIRTY="true" - -# Uncomment the following line if you want to change the command execution time -# stamp shown in the history command output. -# You can set one of the optional three formats: -# "mm/dd/yyyy"|"dd.mm.yyyy"|"yyyy-mm-dd" -# or set a custom format using the strftime function format specifications, -# see 'man strftime' for details. -# HIST_STAMPS="mm/dd/yyyy" - -# Would you like to use another custom folder than $ZSH/custom? -# ZSH_CUSTOM=/path/to/new-custom-folder - -# Which plugins would you like to load? -# Standard plugins can be found in $ZSH/plugins/ -# Custom plugins may be added to $ZSH_CUSTOM/plugins/ -# Example format: plugins=(rails git textmate ruby lighthouse) -# Add wisely, as too many plugins slow down shell startup. -plugins=(git) - -source $ZSH/oh-my-zsh.sh - -# User configuration - -# export MANPATH="/usr/local/man:$MANPATH" - -# You may need to manually set your language environment -# export LANG=en_US.UTF-8 - -# Preferred editor for local and remote sessions -# if [[ -n $SSH_CONNECTION ]]; then -# export EDITOR='vim' -# else -# export EDITOR='mvim' -# fi - -# Compilation flags -# export ARCHFLAGS="-arch x86_64" - -# Set personal aliases, overriding those provided by oh-my-zsh libs, -# plugins, and themes. Aliases can be placed here, though oh-my-zsh -# users are encouraged to define aliases within the ZSH_CUSTOM folder. -# For a full list of active aliases, run `alias`. -# -# Example aliases -# alias zshconfig="mate ~/.zshrc" -# alias ohmyzsh="mate ~/.oh-my-zsh" -source ~/.zsh_profile - -# Use a minimal prompt in Cursor to avoid command detection issues -if [[ "$TERM_PROGRAM" == "vscode" ]]; then - PROMPT='%n@%m:%~%# ' - RPROMPT='' -else - # Otherwise load p10k if needed - # [[ -f ~/.p10k.zsh ]] && source ~/.p10k.zsh +# ── Homebrew ────────────────────────────────────────── +eval "$(/opt/homebrew/bin/brew shellenv)" + +# ── Environment ─────────────────────────────────────── +export EDITOR="nvim" +export GIT_EDITOR="nvim" +export DISABLE_AUTO_TITLE="true" +export PRETTIERD_LOCAL_PRETTIER_ONLY="1" + +# ── PATH ────────────────────────────────────────────── +export PATH="$HOME/.local/bin:$PATH" +export GOPATH="$HOME/go" +export PATH="$GOPATH/bin:$PATH" +export PNPM_HOME="$HOME/Library/pnpm" +export PATH="$PNPM_HOME:$PATH" +export BUN_INSTALL="$HOME/.bun" +export PATH="$BUN_INSTALL/bin:$PATH" + +# ── Cargo ───────────────────────────────────────────── +[[ -f "$HOME/.cargo/env" ]] && source "$HOME/.cargo/env" + +# ── fnm (Node) ──────────────────────────────────────── +eval "$(fnm env --use-on-cd)" + +# ── fzf ─────────────────────────────────────────────── +source <(fzf --zsh) +export FZF_DEFAULT_OPTS="--no-height --no-reverse" +if command -v rg &>/dev/null; then + export FZF_DEFAULT_COMMAND='rg --files --no-ignore --hidden --follow --glob "!.git/*"' + export FZF_CTRL_T_COMMAND="$FZF_DEFAULT_COMMAND" fi +# ── Plugins (brew) ──────────────────────────────────── +source /opt/homebrew/share/zsh-autosuggestions/zsh-autosuggestions.zsh +source /opt/homebrew/share/zsh-syntax-highlighting/zsh-syntax-highlighting.zsh +# ── Aliases ─────────────────────────────────────────── +alias v="nvim" alias co="code-insiders" -alias pn=pnpm -alias px=pnpx -alias nvmrc='echo $1 > .nvmrc' +alias lg="lazygit" +alias pn="pnpm" +alias px="pnpm dlx" alias gc="git branch | fzf | xargs git checkout" +alias gk="git branch | fzf | xargs git kill" +alias cl="$HOME/.claude/local/claude" +alias cld="claude --dangerously-skip-permissions" +alias g="git" -# fzf -[ -f ~/.fzf.zsh ] && source ~/.fzf.zsh -export FZF_DEFAULT_OPTS="--no-height --no-reverse" +# ── Keybindings ─────────────────────────────────────── +bindkey -s ^f "tmux-sessionizer\n" -# rg -if type rg &> /dev/null; then - export FZF_DEFAULT_COMMAND='rg --files --no-ignore --hidden --follow --glob "!.git/*"' - export FZF_CTRL_T_COMMAND="$FZF_DEFAULT_COMMAND" -fi +# ── Starship ────────────────────────────────────────── +eval "$(starship init zsh)" + +# ── Local overrides (secrets, machine-specific) ─────── +[[ -f "$HOME/.zshrc.local" ]] && source "$HOME/.zshrc.local" + +# ── Completions ─────────────────────────────────────── +autoload -Uz compinit && compinit +[[ -f "$HOME/.openclaw/completions/openclaw.zsh" ]] && source "$HOME/.openclaw/completions/openclaw.zsh" diff --git a/zsh/.zshrc.local.example b/zsh/.zshrc.local.example new file mode 100644 index 0000000..7906e1c --- /dev/null +++ b/zsh/.zshrc.local.example @@ -0,0 +1,14 @@ +# Copy to ~/.zshrc.local and fill in values +# DO NOT commit ~/.zshrc.local + +export AZURE_NPM_TOKEN_BASE64="" +export AZURE_DEVOPS_PAT="" +export AZURE_DEVOPS_EXT_PAT="$AZURE_DEVOPS_PAT" +export AZURE_DEVOPS_ORG="bitcoinira" +export AZURE_DEVOPS_URL="https://dev.azure.com/bitcoinira" +export CLOUDFLARE_API_TOKEN="" +export CLOUDFLARE_ZONE_ID="" +export NOTION_API_KEY="" +export ELEVENLABS_API_KEY="" +export XAI_API_KEY="" +export CLAUDE_CODE_OAUTH_TOKEN=""