{
  "markdown": "# dotfiles\n\nPersonal macOS dotfiles. The repository lives directly in `$HOME` and tracks a\nsmall allowlist of config files — everything else in the home directory is\nignored by default (see [`.gitignore`](.gitignore), which ignores `/*` and then\nre-includes only the files below).\n\n## What's included\n\n| Path | Purpose |\n|------|---------|\n| `.gitconfig` | Git settings, colors, and a large set of aliases. Includes `~/.gitconfig.local` for the per-machine user identity. |\n| `.gitignore` | The home-directory allowlist (ignore everything, opt files back in). |\n| `.zshrc` | Zsh / Oh My Zsh configuration. |\n| `Brewfile` | Homebrew packages & casks, installable in one go with `brew bundle`. |\n| `.hammerspoon/` | [Hammerspoon](https://www.hammerspoon.org/) automation (see below). |\n\n### Hammerspoon keybindings\n\nConfigured in `.hammerspoon/`:\n\n| Shortcut | Action |\n|----------|--------|\n| `Ctrl/Option + 1…9, 0` | Switch to Desktop 1–10 (`0` = Desktop 10) |\n| `Option + Shift + 1…9, 0` | Move the focused window to Desktop N (`0` = Desktop 10) |\n| `Option + H / J / K / L` | Focus the window to the left / down / up / right |\n| `Command + F1 / F2` | Dim / brighten the keyboard backlight one step |\n| `Command + F6` | Sleep the Mac like closing the lid — or, if `caffeinate` is running, just lock the screen |\n\n> Desktop 10 (`0`) only works once you map it in macOS: *System Settings →\n> Keyboard → Keyboard Shortcuts → Mission Control → \"Switch to Desktop 10\" =\n> `Ctrl+0`.* macOS auto-assigns `Ctrl+1`…`Ctrl+9` but not `Ctrl+0`.\n\n## Initial setup on a new Mac\n\n### 1. Install Homebrew\n\n```bash\n/bin/bash -c \"$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)\"\n```\n\n### 2. Install Oh My Zsh\n\n[Oh My Zsh](https://ohmyz.sh/) manages the zsh configuration:\n\n```bash\nsh -c \"$(curl -fsSL https://raw.githubusercontent.com/ohmyzsh/ohmyzsh/master/tools/install.sh)\"\n```\n\nThe installer creates/overwrites `~/.zshrc` from its template, backing up any\nexisting one to `~/.zshrc.pre-oh-my-zsh`.\n\n### 3. Clone this repo into `$HOME`\n\nBecause the working tree is the home directory itself (which already contains\nfiles), set the remote up in place rather than a plain `git clone`:\n\n```bash\ncd ~\ngit init\ngit remote add origin <YOUR_REPO_URL>\ngit fetch origin\ngit checkout -f main      # -f overwrites the tracked dotfiles with the repo versions\n```\n\nOnly the allowlisted files are touched; the rest of your home directory is left\nalone.\n\n### 4. Set your Git identity (per machine)\n\n`~/.gitconfig.local` is intentionally **not** tracked, so each machine sets its\nown identity. Create it:\n\n```bash\ncat > ~/.gitconfig.local <<'EOF'\n[user]\n\tname = Your Name\n\temail = you@example.com\nEOF\n```\n\n### 5. Install packages\n\n```bash\nbrew bundle install --file=~/Brewfile\n```\n\nThis installs everything in the `Brewfile`, including Hammerspoon.\n\n### 6. Enable Hammerspoon\n\n1. Launch **Hammerspoon** (installed in the previous step).\n2. Grant it **Accessibility** permission:\n   *System Settings → Privacy & Security → Accessibility → enable Hammerspoon.*\n   (Required for the window/desktop shortcuts.)\n3. Click the menu-bar icon → **Reload Config**.\n\nThe `hs` command-line tool is enabled automatically (`require(\"hs.ipc\")` in\n`init.lua`), so `hs -c \"...\"` works from the terminal after a reload.\n\n## Maintaining the Brewfile\n\nAfter installing or removing Homebrew packages, regenerate the list:\n\n```bash\nbrew bundle dump --force --file=~/Brewfile\n```\n\nOther useful commands:\n\n- `brew bundle check --file=~/Brewfile` — report what's missing.\n- `brew bundle cleanup --file=~/Brewfile` — list packages not in the Brewfile\n  (add `--force` to uninstall them).\n",
  "bytes": 3665,
  "sha": "b206892aa1478fdd90dad4de86ed60cdae46aeeb285c3386def671bf183e0219",
  "repo_slug": "4e6/dotfiles-macos",
  "fonte": "repo",
  "truncated": false,
  "api": "https://agentalog.com/api/listings/okf_4e6_dotfiles_macos_wiki_index_md_734c1aed/readme"
}