Skip to content

cleanup: refresh Brewfile, fix macOS defaults bugs, drop dead code#9

Merged
cedi merged 9 commits into
mainfrom
claude/dotfiles-cleanup-LvFZU
Apr 27, 2026
Merged

cleanup: refresh Brewfile, fix macOS defaults bugs, drop dead code#9
cedi merged 9 commits into
mainfrom
claude/dotfiles-cleanup-LvFZU

Conversation

@cedi
Copy link
Copy Markdown
Owner

@cedi cedi commented Apr 27, 2026

Pre-bootstrap cleanup pass for the new MacBook Pro M5. Brewfile additions/removals, five real bugs in setup_macos_defaults.sh, dead login items, and stale shell integrations.

Brewfile

.Brewfile.core — added: lazygit, difftastic, just, opentofu. Removed: colordiff (git-delta covers it).

.Brewfile.extras — added:

  • Shell/CLI: atuin, yazi, dust, procs, sd, fastfetch, hyperfine, tokei, gron, mods, vale, xh
  • K8s/SRE: dive, kubeseal, flux, argocd, talosctl, crane, both kubelogin variants
  • GUI: bruno cask
  • 4 new taps (fluxcd/tap, siderolabs/tap, Azure/kubelogin, int128/kubelogin)

.Brewfile.extras — removed: neofetch (archived 2024), thefuck (atuin replaces), telnet, gnu-indent, b2-tools, devcleaner, lens, postman. Cmux comment fixed (was cut off mid-sentence).

setup_macos_defaults.sh bugs

  1. configure_remote_login: missing return 0 after the "already enabled" check — was always re-running setremotelogin on
  2. sudo spctl --master-enable--global-enable (deprecated since macOS Ventura)
  3. disable-shadow -bool falsetrue — value was inverted; comment was correct
  4. Dropped AppleMenuBarVisibleInFullscreen line — key doesn't exist; _HIHideMenuBar (already set) is the working one
  5. Added command -v nightlight guard so the function no-ops cleanly if nightlight isn't installed yet

New macOS defaults

  • ApplePressAndHoldEnabled false — vim/Neovim key repeat
  • com.apple.ImageCapture disableHotPlug true — block Photos auto-launch on camera/SD card connect
  • _FXShowPosixPathInTitle true — POSIX path in Finder title bar
  • NSDocumentSaveNewDocumentsToCloud false — default to local disk

Login items

Dropped: Rectangle, BetterMouse, Bartender 5, Alfred 5, Synology Drive Client. None were in the Brewfile and Alfred/Bartender are superseded by Raycast/Ice.

Shell integration

  • atuin.fish: only source ~/.atuin/bin/env.fish if it exists. Brew installs put atuin on PATH directly, so the manual-installer's env.fish wouldn't exist.
  • integration.fish: thefuck block removed.

Linux

  • install_linux.sh: neofetchfastfetch in extras (package list + menu text).

Heads-up

Azure/kubelogin and int128/kubelogin both ship a binary named kubelogin and will collide on install. I included both per the request, with a comment in the extras file flagging it. Pick one if brew bundle errors.

Test plan

  • brew bundle check --file=.Brewfile.core on the new MBP
  • brew bundle check --file=.Brewfile.extras (resolve kubelogin collision if it errors)
  • Run setup_macos_defaults.sh end-to-end; verify Remote Login doesn't double-prompt and nightlight no-op path works
  • defaults read NSGlobalDomain ApplePressAndHoldEnabled returns 0
  • Verify atuin works in fish after fresh brew install (no env.fish present)

Generated by Claude Code

claude and others added 9 commits April 27, 2026 11:24
Brewfile changes
- core: add atuin (extras), lazygit, difftastic, just, opentofu;
  remove colordiff (git-delta covers it)
- extras: add yazi, dust, procs, sd, fastfetch, hyperfine, tokei, gron,
  mods, vale, xh, dive, kubeseal, flux, argocd, talosctl, crane, both
  kubelogin variants, bruno cask
- extras: drop neofetch (archived 2024), thefuck (atuin replaces),
  telnet, gnu-indent, b2-tools, devcleaner, lens, postman
- extras: fix cmux description that was cut off mid-sentence

setup_macos_defaults.sh bug fixes
- configure_remote_login: add missing return 0 so the enable path
  doesn't run after the "already enabled" check
- configure_security: spctl --master-enable -> --global-enable
- configure_screenshots: disable-shadow flipped to true so shadows are
  actually disabled; comment was correct, value was wrong
- configure_menubar: drop AppleMenuBarVisibleInFullscreen line (key
  doesn't exist; kept _HIHideMenuBar which actually works)
- configure_night_shift: guard nightlight invocation with command -v
- configure_login_items: drop Rectangle, BetterMouse, Bartender 5,
  Alfred 5, Synology Drive Client (not in Brewfile, replaced, or
  superseded by Raycast/Ice)

New macOS defaults
- ApplePressAndHoldEnabled false (vim/Neovim key repeat)
- com.apple.ImageCapture disableHotPlug true (block Photos auto-launch
  on camera/SD card connect)
- _FXShowPosixPathInTitle true (POSIX path in Finder title bar)
- NSDocumentSaveNewDocumentsToCloud false (default to local disk)

Shell integration
- atuin.fish: only source ~/.atuin/bin/env.fish if it exists, since
  brew install puts atuin on PATH directly
- integration.fish: drop thefuck integration

Linux
- install_linux.sh: replace neofetch with fastfetch in extras

Note: Azure/kubelogin and int128/kubelogin both ship a `kubelogin`
binary and will collide on install. The extras file documents this;
pick one if `brew bundle` complains.
Both Azure/kubelogin and int128/kubelogin install a `kubelogin` binary
and would collide anyway. Cluster auth is handled by Tailscale
ts-k8s-auth and Teleport, so neither plugin is needed.
Adds set_default_shell() that ensures the brew fish path is registered
in /etc/shells, then chsh's the user to it. Uses dscl to read the
actual login shell (not $SHELL, which only reflects the current
process). Wired into the Full, Core-only, and Custom flows.
`"background": "transparent"` forces oh-my-posh to query the terminal
for its actual background color (OSC 11) on every prompt redraw. Under
cmux this leaks the query bytes back to stdin (cmux PTY bug). Pin to
the palette's `p:background` so no terminal query is needed and the
prompts stay visually consistent with the rest of the theme.
git-delta auto-detects light/dark by sending OSC 11 (background color)
and DA1 capability queries on every invocation. cmux's PTY layer
echoes the responses back as visible output (same root cause as the
oh-my-posh transient prompt fix). Pinning `dark = true` and an
explicit `syntax-theme` makes delta skip both queries.
bat, git-delta, vim, and most ratatui-based TUIs check COLORFGBG
before issuing OSC 11 (background color) or CSI ?997 (color-scheme)
queries. Pinning it to "15;0" (white on black, dark mode) makes them
skip the queries entirely. Defensive fix for the cmux 0.63.x PTY bug
that leaks query responses into stdout, and a small perf win on every
prompt regardless of terminal.
@cedi cedi merged commit d7b667a into main Apr 27, 2026
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants