From 5b882ce27970e17bb3ddfe08e2c59a53a00b00a2 Mon Sep 17 00:00:00 2001 From: Igor Soarez Date: Thu, 1 Oct 2026 21:07:46 +0300 Subject: Brewfile: toggleMute and QuickMD, from their authors' taps Neither is in homebrew-cask. That costs three things this file cannot express on its own, so install.sh carries them: brew will not load a cask from an unofficial tap until it is trusted, which is per machine and recorded outside the repo; the trust is granted per cask rather than per tap, so it covers these two files and not whatever the taps add later; and toggleMute is not notarized, so Gatekeeper refuses it until com.apple.quarantine is cleared -- that one attribute on that one path, not the `xattr -cr` its README asks for. Nothing here vouches for either binary, and a third-party tap can change what it installs between two runs. Both are deliberate exceptions, named as such. --- Brewfile | 17 +++++++++++++++++ install.sh | 28 ++++++++++++++++++++++++++++ 2 files changed, 45 insertions(+) diff --git a/Brewfile b/Brewfile index 188a911..afb33f2 100644 --- a/Brewfile +++ b/Brewfile @@ -40,6 +40,23 @@ cask "neovide-app" # Wanted on any Mac this account uses, though nothing here depends on it. cask "keepingyouawake" # menu-bar toggle that stops the Mac sleeping cask "jordanbaird-ice" # Ice: hides and arranges the menu bar itself + +# Neither of these is in homebrew-cask, so they come from their authors' own +# taps, with what that means: nobody reviewed the cask, and the tap can change +# what it installs between two runs of install.sh, which applies this file +# again every time. brew will not load a cask from an unofficial tap until it +# is trusted, once per machine, which cannot be expressed here -- install.sh +# does it, so the decision sits in a tracked file rather than in a README +# someone pastes from. +tap "satrik/togglemute" +tap "b451c/quickmd" +cask "satrik/togglemute/togglemute" # menu-bar mic mute, and it follows the + # hardware mute button on a headset. Not + # notarized: install.sh clears the + # quarantine flag macOS would refuse on +cask "b451c/quickmd/quickmd" # qmd.app: native markdown viewer, live + # preview, AppKit rather than Electron + # Only where no Ghostty is installed yet: a machine running the ghostty@tip # build would collide with a second cask over /Applications/Ghostty.app. cask "ghostty" unless File.exist?("/Applications/Ghostty.app") diff --git a/install.sh b/install.sh index a9b1f7a..3ee3f67 100755 --- a/install.sh +++ b/install.sh @@ -51,6 +51,19 @@ if [[ "$(uname)" == "Darwin" ]]; then >&2 echo ' /bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"' exit 1 fi + # Two casks in the Brewfile come from their authors' own taps, and brew + # refuses to load a cask from an unofficial tap until it is trusted. Trust is + # per machine, recorded in $XDG_CONFIG_HOME/homebrew/trust.json, so it cannot + # live in the Brewfile; naming the casks rather than the taps keeps the trust + # to these two files instead of everything the taps ever add. Older Homebrews + # have no `trust` subcommand and need nothing, hence the guard. + if brew help trust >/dev/null 2>&1; then + for untrusted_cask in satrik/togglemute/togglemute b451c/quickmd/quickmd; do + brew trust --cask "${untrusted_cask}" >/dev/null || \ + >&2 echo "WARNING: could not trust ${untrusted_cask}; brew bundle will skip it" + done + fi + # --no-upgrade: install what is missing and leave what is there alone. Plain # `brew bundle` also upgrades every listed package that is out of date. # @@ -66,6 +79,21 @@ if [[ "$(uname)" == "Darwin" ]]; then >&2 echo "above). Continuing with the rest of the setup." >&2 echo fi + + # toggleMute is not notarized, so Gatekeeper refuses to open it while the + # download carries com.apple.quarantine, and the author's install + # instructions say to clear it. Only that one attribute, not the `xattr -cr` + # the README asks for, which strips every extended attribute the app has. + # Nothing here can vouch for the binary: this is a deliberate exception for + # one app, which is why it names the path rather than looping over + # /Applications. + togglemute_app="/Applications/toggleMute.app" + if [[ -d "${togglemute_app}" ]] && + xattr "${togglemute_app}" 2>/dev/null | grep -q com.apple.quarantine + then + echo "INFO: clearing the quarantine flag on ${togglemute_app}" + xattr -dr com.apple.quarantine "${togglemute_app}" + fi fi # 2. Checkouts the config reads: the pure prompt (config/zshrc falls back to a -- cgit v1.2.3