Skip to content

timomak/new-macbook-script

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

new-macbook-script

One-command setup for a fresh Mac. Installs the apps I use, symlinks my shell + Hammerspoon configs, and wires up the custom keyboard/mouse shortcuts I depend on.

git clone https://github.com/timomak/new-macbook-script.git
cd new-macbook-script
./start

That's it. Re-run ./start any time to pull latest and reload.

What it installs

Installed via Detection
Homebrew official curl installer command -v brew
Hammerspoon brew install --cask brew list --cask
Warp brew install --cask brew list --cask
Node.js brew install node command -v node
Claude Code npm install -g @anthropic-ai/claude-code command -v claude
oh-my-zsh official curl installer [ -d ~/.oh-my-zsh ]

Skips anything already installed. Safe to re-run.

What it configures

Hammerspoon

Symlinks ~/.hammerspoon./hammerspoon/. The umbrella init.lua requires two recipe repos that are cloned into ./hammerspoon/:

  • warp-claude-hotkey — Cmd+Shift+D in Warp splits the current pane (same cwd) and runs claude. Cmd+Shift+A does the same, then submits /address-code-review-comments ultrathink once Claude is up.
  • mx-mouse-fix — Logitech MX Master side buttons switch desktops; thumb-rest button opens Mission Control.

To add a new recipe later:

  1. Add its repo name to RECIPES=(...) in ./start.
  2. Add an ignore line for it in .gitignore.
  3. Add _G.myThing = require("my-thing") to hammerspoon/init.lua.
  4. Commit + re-run ./start.

Shell

Symlinks ~/.zshrc./shell/zshrc and ~/.zprofile./shell/zprofile.

.zshrc sets up oh-my-zsh with the git plugin (which provides gaa, gc, gp, gst, and friends), plus personal aliases:

alias ..='cd ..'
alias ...='cd ../..'
alias claude="claude --dangerously-skip-permissions --remote-control --effort max"

Optional integrations (uv's env, OpenClaw completions) are sourced only if present.

.zprofile sets up Homebrew on PATH and OrbStack if installed.

What you still have to do manually

macOS security doesn't let a script grant these:

  1. Accessibility (System Settings → Privacy & Security → Accessibility) — enable Hammerspoon. The script opens this pane for you.
  2. Automation → System Events (same pane, Automation section) — enable Hammerspoon. Needed for the Warp Cmd+Shift+D hotkey (it uses AppleScript to drive Warp).
  3. Launch at login for Hammerspoon — Hammerspoon menu bar → Preferences → "Launch Hammerspoon at login".

Backups

If ~/.zshrc, ~/.zprofile, or ~/.hammerspoon already exist as real files (not symlinks), ./start moves them to ~/*.bak.<timestamp> before symlinking. Nothing is destroyed.

Uninstall

rm ~/.hammerspoon ~/.zshrc ~/.zprofile  # remove the symlinks
# restore ~/*.bak.<timestamp> if you want the originals back

Apps installed via brew can be removed with brew uninstall --cask hammerspoon warp.

License

MIT

About

One-command Mac setup: Homebrew, Hammerspoon (with warp-claude-hotkey + mx-mouse-fix recipes), Warp, Claude Code, oh-my-zsh, shell dotfiles

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors