Skip to content

Commit a221fd5

Browse files
committed
chore(dotfiles): batch dangling workspace updates
Apply pending repo-local editor associations, Windows bootstrap winget Wakatime installs, Brew ignore/docs updates, and Cursor terminal profile tweaks in one atomic change. Made-with: Cursor
1 parent d26bad2 commit a221fd5

6 files changed

Lines changed: 91 additions & 8 deletions

File tree

.vscode/settings.json

Lines changed: 9 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,12 @@
11
{
2-
"workbench.iconTheme": "fira-code-material-minimal",
3-
"editor.fontFamily": "fira-code-nerd, FiraCode Nerd Font, Consolas, 'Courier New', monospace",
4-
"editor.fontLigatures": true,
5-
"terminal.integrated.defaultProfile.linux": "zsh",
6-
"terminal.integrated.profiles.linux": {
7-
"zsh": {
8-
"path": "zsh"
9-
}
2+
"files.associations": {
3+
"*.tmpl": "gotmpl",
4+
"*.sh.tmpl": "shellscript",
5+
"*.ps1.tmpl": "powershell",
6+
"*.json.tmpl": "jsonc",
7+
"*.jsonc.tmpl": "jsonc",
8+
"*.toml.tmpl": "toml",
9+
"*.cfg.tmpl": "ini",
10+
"*.zsh.tmpl": "shellscript"
1011
}
1112
}

README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -209,5 +209,6 @@ gh attestation verify oci://ghcr.io/chipwolf/dotfiles:v1.5.1 --repo chipwolf/dot
209209

210210
| Document | Contents |
211211
|------------------------------------|----------------------------------------------------------------|
212+
| [docs/brew-review.md](docs/brew-review.md) | Homebrew drift review flow, prompts, and safe tap handling |
212213
| [docs/yubikey.md](docs/yubikey.md) | YubiKey SSH workflow, backup strategy, credential hygiene |
213214
| [docs/secrets.md](docs/secrets.md) | Bitwarden integration, GnuPG config, secret introduction order |

docs/brew-review.md

Lines changed: 56 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,56 @@
1+
# brew-review
2+
3+
`brew-review` is an interactive Homebrew drift review helper used by this dotfiles repo.
4+
5+
It compares:
6+
7+
- what is currently installed (`brew bundle dump`)
8+
- what is declared in `home/Brewfile`
9+
- what is explicitly ignored in `home/Brewfile.ignore`
10+
11+
## Why it exists
12+
13+
Over time, ad-hoc `brew install` usage can create drift between your machine and the repo's declared package set. `brew-review` helps reconcile that drift so `Brewfile` stays intentional.
14+
15+
## When it runs
16+
17+
The script is wired into chezmoi as an `after` `run_onchange` script:
18+
19+
- `home/.chezmoiscripts/run_onchange_after_brew_review.sh.tmpl`
20+
21+
It runs after apply when the tracked `Brewfile` content changes, and only in interactive sessions (TTY). In non-interactive contexts, it exits silently.
22+
23+
## What it does
24+
25+
For each package installed locally but missing from `Brewfile` (and not ignored), it prompts:
26+
27+
- **add**: append to `Brewfile` and re-sort sections
28+
- **remove**: uninstall the package
29+
- **ignore permanently**: append to `Brewfile.ignore`
30+
- **skip**: do nothing
31+
32+
It also reports packages declared in `Brewfile` but currently missing locally (informational only).
33+
34+
## Manual usage
35+
36+
The executable is managed at:
37+
38+
- `home/dot_scripts/executable_brew-review` (deploys to `~/.scripts/brew-review`)
39+
40+
Basic usage:
41+
42+
```bash
43+
brew-review
44+
```
45+
46+
Optional positional arguments:
47+
48+
```bash
49+
brew-review /path/to/Brewfile /path/to/Brewfile.ignore
50+
```
51+
52+
## Notes
53+
54+
- Sections are sorted by package name while preserving section order.
55+
- Tap removal is handled safely by uninstalling installed tap packages before untapping.
56+
- `Brewfile` and `Brewfile.ignore` in this repo are source-state files (they are not directly deployed into `~/`).

home/.chezmoiscripts/run_onchange_after_bootstrap_windows.ps1.tmpl

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,9 +22,15 @@
2222
"winlibs"
2323
"wezterm"
2424
-}}
25+
{{- $wingetPackages := list
26+
"Wakatime.CLIWakatime"
27+
"Wakatime.DesktopWakatime"
28+
-}}
2529
{{ if eq .chezmoi.os "windows" -}}
2630
# Chocolatey package list hash (triggers re-run when this list changes):
2731
# {{ join " " $chocoPackages | sha256sum }}
32+
# Winget package list hash (triggers re-run when this list changes):
33+
# {{ join " " $wingetPackages | sha256sum }}
2834

2935
$ErrorActionPreference = "Stop"
3036

@@ -45,6 +51,18 @@ $elevatedScript = {
4551
Write-Host "Installing Chocolatey packages..."
4652
choco install {{ join " " $chocoPackages }} -y --no-progress
4753

54+
$wingetPackages = "{{ join " " $wingetPackages }}".Split(" ", [System.StringSplitOptions]::RemoveEmptyEntries)
55+
foreach ($wingetPackage in $wingetPackages) {
56+
$existing = winget list --id $wingetPackage --exact --accept-source-agreements 2>$null | Out-String
57+
if ($existing -match [Regex]::Escape($wingetPackage)) {
58+
Write-Host "Winget package already installed: $wingetPackage"
59+
continue
60+
}
61+
62+
Write-Host "Installing Winget package: $wingetPackage"
63+
winget install --id $wingetPackage --exact --silent --accept-package-agreements --accept-source-agreements
64+
}
65+
4866
# --- WSL ---
4967
if (-not (Get-Command wsl -ErrorAction SilentlyContinue)) {
5068
Write-Host "Installing WSL..."

home/.chezmoitemplates/cursor-settings.json.tmpl

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,12 @@
99
"obsidianPreview.vaultPath": "{{ .chezmoi.homeDir }}/Documents/Obsidian/Vault",
1010
"update.releaseTrack": "prerelease"{{ if eq .chezmoi.os "windows" }},
1111
"terminal.integrated.fontFamily": "FiraCode Nerd Font Mono",
12+
"terminal.integrated.defaultProfile.linux": "zsh",
13+
"terminal.integrated.profiles.linux": {
14+
"zsh": {
15+
"path": "zsh"
16+
}
17+
},
1218
"terminal.integrated.defaultProfile.windows": "WSL Bash",
1319
"terminal.integrated.profiles.windows": {
1420
"WSL Bash": {

home/Brewfile.ignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,4 +2,5 @@
22
# Packages listed here are permanently excluded from drift review.
33
# One entry per line, same format as Brewfile (e.g. `brew "foo"`, `cask "bar"`).
44
# Lines beginning with # are ignored.
5+
brew "k9s"
56
brew "prowler"

0 commit comments

Comments
 (0)