Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 1 addition & 4 deletions .gitmodules
Original file line number Diff line number Diff line change
@@ -1,9 +1,6 @@
[submodule "zprezto"]
path = zprezto
url = https://github.com/jpmontez/prezto.git
url = https://github.com/sorin-ionescu/prezto.git
[submodule "nvim/.config/nvim"]
path = nvim/.config/nvim
url = https://github.com/jpmontez/kickstart.nvim.git
[submodule "base16/.config/base16-shell"]
path = base16/.config/base16-shell
url = https://github.com/chriskempson/base16-shell.git
7 changes: 6 additions & 1 deletion Brewfile
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ brew "stow" # symlink manager — deploys dotfiles packages into $HOME
brew "zsh" # Homebrew zsh for a current release independent of macOS
brew "tmux" # terminal multiplexer
brew "git" # .gitconfig needs >= 2.38 (rebase.updateRefs, zdiff3); macOS ships Xcode's git
brew "fzf" # zsh Ctrl-R/Ctrl-T/Alt-C pickers (zsh/.zshrc)

# ---- Editor & search ----
brew "neovim" # editor (configured via nvim/ package)
Expand All @@ -29,6 +30,9 @@ brew "tree" # directory listing
# ---- Dev tooling ----
brew "gh" # GitHub CLI — auth, PRs, issues
brew "node"
brew "go" # also needed for nvim's gopls (Mason installs it via `go install`)
brew "python@3.14"
brew "uv" # Python package/project manager
brew "shellcheck" # lints this repo's scripts (also run in CI)
brew "xcodegen" # generate .xcodeproj from a spec
brew "helm"
Expand All @@ -38,7 +42,6 @@ brew "kubernetes-cli"
# ---- macOS setup helpers ----
brew "dockutil" # CLI for managing Dock icons (used by macos/defaults.sh)
brew "mas" # Mac App Store CLI (used by the mas entries below)
brew "terminal-notifier" # aliased in zsh/.aliases

# ---- GUI apps ----
cask "ghostty" # GPU-accelerated terminal emulator
Expand All @@ -48,6 +51,7 @@ cask "claude" # Claude desktop app
cask "google-chrome"
cask "docker-desktop"
cask "1password"
cask "1password-cli" # `op`
cask "sizeup" # keyboard-driven window manager
cask "clipy" # clipboard manager with history
cask "thaw" # menu bar manager — succeeded Ice
Expand All @@ -65,6 +69,7 @@ cask "zoom"
mas "Amphetamine", id: 937984704 # prevent sleep / screen saver
mas "Balance Lock", id: 1019371109 # keep audio balance centred
mas "Little Snitch Mini", id: 1629008763 # outbound connection monitor
mas "Pages", id: 361309726

# Safari extensions
mas "1Password for Safari", id: 1569813296
Expand Down
12 changes: 5 additions & 7 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -32,15 +32,14 @@ Each package directory mirrors `$HOME` and is symlinked in by `stow`:

| Package | Symlinks to `$HOME` | Notes |
|-----------|-----------------------------------|--------------------------------|
| `zsh` | `.zshrc`, `.zprofile`, `.aliases` | Shell config + prezto init |
| `zsh` | `.zshrc`, `.zprofile`, `.aliases`, `.zpreztorc` | Shell config + prezto init and settings |
| `git` | `.gitconfig` | Git identity and defaults |
| `tmux` | `.tmux.conf` | Prefix, vim keys, copy-paste |
| `ghostty` | `.config/ghostty/config` | Font, window size, bell behaviour |
| `ghostty` | `.config/ghostty/config` | Font, palette, bells, Option-as-Alt |
| `ssh` | `.ssh/config` | Stowed `--no-folding` — see [below](#why-ssh-is-stowed-differently) |
| `nvim` | `.config/nvim` | Submodule: kickstart.nvim |
| `base16` | `.config/base16-shell` | Submodule: base16 color scheme |
| `claude` | `.claude/settings.json` | Claude Code plugins, theme, model, notification hook |
| `zprezto` | `.zprezto`, `.zpreztorc`, etc. | Manual symlinks via bootstrap |
| `claude` | `.claude/statusline.sh` | Claude Code status line (`settings.json` is Claude Code's own, not stowed) |
| `zprezto` | `.zprezto`, `.zshenv`, etc. | Manual symlinks via bootstrap |

| Path | Purpose |
|---------------------|---------------------------------------------------------------|
Expand Down Expand Up @@ -124,9 +123,8 @@ repo. `doctor.sh` flags it if it ever folds back.

| Submodule | Repo |
|-------------------------------|----------------------------------------|
| `zprezto` | `github.com/jpmontez/prezto` |
| `zprezto` | `github.com/sorin-ionescu/prezto` |
| `nvim/.config/nvim` | `github.com/jpmontez/kickstart.nvim` |
| `base16/.config/base16-shell` | `github.com/chriskempson/base16-shell` |

`bootstrap.sh` initializes them; refresh with `git submodule update --init --recursive`.

Expand Down
1 change: 0 additions & 1 deletion base16/.config/base16-shell
Submodule base16-shell deleted from 588691
3 changes: 2 additions & 1 deletion doctor.sh
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,8 @@ else
hint "./bootstrap.sh — unfolds it and restows with --no-folding"
else
ok "~/.ssh is a real directory"
perms="$(stat -f '%Lp' "$HOME/.ssh" 2>/dev/null || echo "?")"
# GNU stat first (Linux); BSD stat (macOS) rejects -c and falls through.
perms="$(stat -c '%a' "$HOME/.ssh" 2>/dev/null || stat -f '%Lp' "$HOME/.ssh" 2>/dev/null || echo "?")"
if [[ "$perms" == "700" ]]; then
ok "~/.ssh permissions are 700"
else
Expand Down
13 changes: 7 additions & 6 deletions ghostty/.config/ghostty/config
Original file line number Diff line number Diff line change
Expand Up @@ -8,12 +8,13 @@ window-width = 80
# which is unfocused-only and silent.
bell-features = system,audio,attention,title

# base16-ocean, pinned here rather than left to base16-shell alone. The shell
# script only repaints the palette via OSC escapes once an interactive zsh
# starts, so the terminal would otherwise open on Ghostty's default scheme and
# flip mid-startup — and anything not launched from an interactive shell would
# keep the wrong palette. Values are byte-identical to
# base16-shell/scripts/base16-ocean.sh, so the two never disagree.
# Left Option sends Alt (Meta) so shell, tmux and nvim Alt bindings work —
# e.g. fzf's Alt-C, zsh's Alt-. (insert last argument), Alt-b/f word moves.
# Right Option still composes accented characters.
macos-option-as-alt = left

# base16-ocean. This is the one terminal palette: tmux styles with these ANSI
# slots and nvim's base16-ocean colorscheme uses the same values.
# Slots 16-21 carry base09/0F/01/02/04/06, which base16 uses for the extra
# neutrals (e.g. colour20 = base04) that plain ANSI has no room for.
palette = 0=#2b303b
Expand Down
2 changes: 1 addition & 1 deletion lib.sh
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ DOTFILES_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
MACHINE_FILE="$DOTFILES_DIR/.machine"

# Stow packages carrying no special options.
STOW_PACKAGES=(zsh git tmux ghostty nvim base16 claude)
STOW_PACKAGES=(zsh git tmux ghostty nvim claude)

# ssh is stowed on its own: --no-folding keeps ~/.ssh a real directory holding a
# symlinked config. Folded, ~/.ssh would itself be a symlink into this repo, and
Expand Down
13 changes: 13 additions & 0 deletions macos/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ One-time system setup for fresh macOS installs. Not a stow package.
```bash
bash macos/defaults.sh # apply
bash macos/defaults.sh --check # report drift, write nothing, exit 1 if any
bash macos/defaults.sh --capture # re-copy SizeUp's live shortcuts into SizeUp.plist
```

Idempotent — safe to re-run. `bootstrap.sh` prompts to run it; `doctor.sh` calls
Expand All @@ -24,6 +25,11 @@ Both modes walk that same table — apply calls `defaults write`, check calls
apply writes. Booleans are normalised before comparison, since `defaults read`
prints `0`/`1` rather than `false`/`true`.

Nested values (dicts, arrays) use type `plist`: the row's value names a file in
`macos/` holding that key's value. Apply passes the XML straight to
`defaults write`, which keeps every type; check compares the XML `plutil`
renders from both sides.

The Caps Lock remap, Dock contents, login items, Touch ID, and the firewall need
more than a scalar comparison, so each has a matching `process_*` function with
an explicit check branch.
Expand All @@ -34,6 +40,13 @@ Read `SETTINGS` for the exact list. In summary: appearance, keyboard, text
substitution, trackpad, Dock, Finder, screen saver, menu bar, and
per-app defaults for SizeUp and Clipy. Beyond the table:

- **SizeUp** — every shortcut and window size, stored as `plist` rows backed by
[`SizeUp.plist`](SizeUp.plist). After changing SizeUp's preferences, run
`bash macos/defaults.sh --capture` and commit the diff. Capture copies only
the keys listed in `SETTINGS`, so usage counters, update timestamps, and window
positions in the same domain stay out of the repo; a new key needs its row
added first. Quit and relaunch SizeUp after an apply so it picks the values up.

- **Dock contents** — populated via `dockutil` from `DOCK_APPS`. Entries whose app doesn't exist on this macOS version are skipped rather than aborting the run.
- **Screen saver** — password required immediately. *Best-effort:* since Ventura this pane is partly system-managed and the write may not stick; `--check` shows it as drift if so.
- **Security** — Touch ID for `sudo` and the application firewall with stealth mode. FileVault is never touched here — turning it on generates a recovery key a human has to record, so `doctor.sh` reports its status instead.
Expand Down
197 changes: 197 additions & 0 deletions macos/SizeUp.plist
Original file line number Diff line number Diff line change
@@ -0,0 +1,197 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>Center</key>
<dict>
<key>ComboCode</key>
<integer>8</integer>
<key>ComboFlags</key>
<integer>1835008</integer>
</dict>
<key>Down</key>
<dict>
<key>ComboCode</key>
<integer>125</integer>
<key>ComboFlags</key>
<integer>1835008</integer>
<key>Height</key>
<real>0.5</real>
<key>Width</key>
<real>1</real>
<key>X</key>
<real>0.0</real>
<key>Y</key>
<real>0.5</real>
</dict>
<key>Full Screen</key>
<dict>
<key>ComboCode</key>
<integer>46</integer>
<key>ComboFlags</key>
<integer>1835008</integer>
<key>Height</key>
<real>1</real>
<key>Width</key>
<real>1</real>
<key>X</key>
<real>0.0</real>
<key>Y</key>
<real>0.0</real>
</dict>
<key>Left</key>
<dict>
<key>ComboCode</key>
<integer>123</integer>
<key>ComboFlags</key>
<integer>1835008</integer>
<key>Height</key>
<real>1</real>
<key>Width</key>
<real>0.5</real>
<key>X</key>
<real>0.0</real>
<key>Y</key>
<real>0.0</real>
</dict>
<key>Lower Left</key>
<dict>
<key>ComboCode</key>
<integer>125</integer>
<key>ComboFlags</key>
<integer>917504</integer>
<key>Height</key>
<real>0.5</real>
<key>Width</key>
<real>0.5</real>
<key>X</key>
<real>0.0</real>
<key>Y</key>
<real>0.5</real>
</dict>
<key>Lower Right</key>
<dict>
<key>ComboCode</key>
<integer>124</integer>
<key>ComboFlags</key>
<integer>917504</integer>
<key>Height</key>
<real>0.5</real>
<key>Width</key>
<real>0.5</real>
<key>X</key>
<real>0.5</real>
<key>Y</key>
<real>0.5</real>
</dict>
<key>Next Monitor</key>
<dict>
<key>ComboCode</key>
<integer>124</integer>
<key>ComboFlags</key>
<integer>786432</integer>
</dict>
<key>Prev Monitor</key>
<dict>
<key>ComboCode</key>
<integer>123</integer>
<key>ComboFlags</key>
<integer>786432</integer>
</dict>
<key>Right</key>
<dict>
<key>ComboCode</key>
<integer>124</integer>
<key>ComboFlags</key>
<integer>1835008</integer>
<key>Height</key>
<real>1</real>
<key>Width</key>
<real>0.5</real>
<key>X</key>
<real>0.5</real>
<key>Y</key>
<real>0.0</real>
</dict>
<key>SnapBack</key>
<dict>
<key>ComboCode</key>
<integer>44</integer>
<key>ComboFlags</key>
<integer>1835008</integer>
</dict>
<key>Space Above</key>
<dict>
<key>ComboCode</key>
<integer>126</integer>
<key>ComboFlags</key>
<integer>1310720</integer>
</dict>
<key>Space Below</key>
<dict>
<key>ComboCode</key>
<integer>125</integer>
<key>ComboFlags</key>
<integer>1310720</integer>
</dict>
<key>Space Next</key>
<dict>
<key>ComboCode</key>
<integer>124</integer>
<key>ComboFlags</key>
<integer>1310720</integer>
</dict>
<key>Space Prev</key>
<dict>
<key>ComboCode</key>
<integer>123</integer>
<key>ComboFlags</key>
<integer>1310720</integer>
</dict>
<key>Up</key>
<dict>
<key>ComboCode</key>
<integer>126</integer>
<key>ComboFlags</key>
<integer>1835008</integer>
<key>Height</key>
<real>0.5</real>
<key>Width</key>
<real>1</real>
<key>X</key>
<real>0.0</real>
<key>Y</key>
<real>0.0</real>
</dict>
<key>Upper Left</key>
<dict>
<key>ComboCode</key>
<integer>123</integer>
<key>ComboFlags</key>
<integer>917504</integer>
<key>Height</key>
<real>0.5</real>
<key>Width</key>
<real>0.5</real>
<key>X</key>
<real>0.0</real>
<key>Y</key>
<real>0.0</real>
</dict>
<key>Upper Right</key>
<dict>
<key>ComboCode</key>
<integer>126</integer>
<key>ComboFlags</key>
<integer>917504</integer>
<key>Height</key>
<real>0.5</real>
<key>Width</key>
<real>0.5</real>
<key>X</key>
<real>0.5</real>
<key>Y</key>
<real>0.0</real>
</dict>
</dict>
</plist>
Loading
Loading