Repository navigation
Releases
v0.1.0-beta.5
headless-spotify 0.1.0-beta.5 Compatibility with trak (github.com/Kathir-D/trak), a terminal UI for Spotify. - New `headless-spotify launch`: starts Spotify in the background (activates:false) and waits up to --timeout (default 10 s) for `player state`. No-op if Spotify is already running. Never edits Info.plist, never re-signs, never needs sudo. - `status --json` is now a versioned contract: adds "schema": 1, no fields renamed. The field set is pinned by tests and documented in the README. - README: new Companions section covering Sonar and trak. - CI: the cask install check now stages the cask at the VERSION being built.
v0.1.0-beta.4
headless-spotify 0.1.0-beta.4 One-command install, and the app asks for its own permission. - brew install --cask is now the whole install. The privileged step runs from the postflight, gated on Spotify < 1.3.1, because at or above that the edit provably cannot succeed and its re-sign cannot be undone. A blocked Spotify is left untouched instead of half-modified. - Caveats: 40 lines to 7. - The menu bar app asks macOS for the Apple Events permission it needs, on launch, instead of leaving a raw -1743 to be diagnosed. - Gatekeeper: quarantine is cleared from the Caskroom as well as the app, so the toggle no longer hangs behind 'Apple could not verify'. - App icon: macOS squircle, 45° ramp #5BCEFA to #F5A9B8, white music note matching the top bar. Drawn by scripts/make-icon.swift on every build.
v0.1.0-beta.3
headless-spotify v0.1.0-beta.3 Ships Homebrew as a cask instead of a formula, so `brew install --cask` leaves a working menu bar item in /Applications and the privileged Spotify edit is the only thing behind `sudo`. The bundle now carries install.sh, uninstall.sh and the injector dylib, install.sh stops clobbering what the cask owns, and the cask replaces the formula in the tap.
v0.1.0-beta.2
Pre-release of the safety work. v0.1.0-beta.1 is stale — it predates every fix below — so it is left in place untouched rather than moved: the artifact published under a given version must never change.
What is safe now
hidecannot touch anything but Spotify. It refuses any bundle whose identifier is notcom.spotify.client, so a wrong--spotify-appcannot de-icon some other app.--forceoverrides this deliberately.- A Spotify version that cannot be hidden is left completely alone. After 3 failed attempts the watcher marks that version unhideable and stops touching it — no more quitting, no more re-signing. It only retries when Spotify's version actually changes.
restorenever applies a stale backup. If Spotify auto-updated while hidden, it removes only the key we added instead of copying an oldInfo.plistover the new one, and says plainly that Apple's original signature cannot be recovered from a stale backup.restoredoes not interrupt playback for nothing. If there is nothing to restore it changes nothing and leaves Spotify running, reporting the current Dock state.- Uninstall stops everything first. The watcher and the menu bar app are killed before the bundle is restored, so a running daemon cannot re-hide Spotify mid-uninstall.
install.shnever strands you. If hiding fails to verify it restoresInfo.plistand relaunches Spotify, and skips installing the watcher. It never leaves a Spotify that will not start.
Menu bar extra
The row is now a state, not an action: it reads "Hidden from Dock" and is ticked exactly while Spotify is hidden, and clicking it flips that. The menu bar icon follows the same state — a crossed-out eye while hidden, a music note while visible — so you can tell at a glance without opening the menu or quitting anything.
Fixes
swift testcould deadlock the whole suite.ProcessRunner.runwaited on child processes with blocking calls, which parked the Swift cooperative thread it ran on. The thread pool is sized to the core count, so enough concurrent children occupied every thread and the run hung with nothing left to execute test bodies. The blocking work now happens on its own queue. A regression test starts 40 children at once — more than any machine has cores — and it hangs against the old code.- The release job pushed its formula bump from a detached HEAD, so the bump never landed. It now pushes to the default branch explicitly.
- The formula now publishes to
Kathir-D/homebrew-tap, next to Sonar, instead of a tap that does not exist.install.shsits at the top of the keg where it can actually findbin/,lib/and the menu bar app. install.shno longer aborts and strands Spotify when hiding fails;uninstall.shresolves the real uid and home fromSUDO_USERso the watcher is actually stopped.
Still true
Spotify ≥1.3.1 exits on launch when LSUIElement=true is present, and its hardened runtime strips DYLD_*, so on current Spotify both hiding methods are blocked. The tool implements them, fails honestly, and tells you to run restore. See "Current status" in the README.
v0.1.0-beta.1 — TESTING RELEASE (pre-release)
⚠️ Testing release — not a stable release
This is a pre-release for testing on a real machine. It is published so you can
try the full install → hide → restore → uninstall flow on a second Mac with your own
Spotify account, and report what breaks. Please do not point anything production at it.
Known blocker, stated up front: on Spotify ≥ 1.3.1 the hiding itself does not work
yet — Spotify quits as soon as LSUIElement=true is present in its Info.plist, and its
hardened runtime strips DYLD_* so the injector fallback is ignored too. hide exits 1,
rolls the plist back, and leaves Spotify launchable. Everything else (install, status,
control, the watcher, the menu bar app) works. If hiding succeeds on your machine, that
alone is valuable news — say which Spotify version you have.
Install (test machine)
curl -LO https://github.com/Kathir-D/headless-spotify/releases/download/v0.1.0-beta.1/headless-spotify-0.1.0-beta.1-macos.tar.gz
shasum -a 256 -c SHA256SUMS.txt # if you downloaded both files
tar -xzf headless-spotify-0.1.0-beta.1-macos.tar.gz
cd headless-spotify-0.1.0-beta.1
sudo ./install.sh /Applications/Spotify.appThe binaries are ad-hoc signed, not notarized. If macOS refuses to run the app or CLI
after a browser download, clear quarantine once: xattr -dr com.apple.quarantine .
install.sh backs up Info.plist and its code seal, installs the CLI, the injector dylib,
the menu bar app, and the watcher LaunchAgent. It never needs sudo again afterwards.
What to test
headless-spotify status— does it describe your machine correctly?headless-spotify control play|pause|next|volume— AppleScript passthrough.- Menu bar icon → Enable/Disable hiding toggle, then Quit.
sudo ./uninstall.sh— Spotify must be back to normal with Apple's original
signature intact:codesign --verify /Applications/Spotify.app.- If
hidefailed, confirm it said so and that Spotify still launches.
Uninstall
./uninstall.sh /Applications/Spotify.appFull details
See the README for the hiding
mechanism, the Sonar compatibility matrix, and troubleshooting.
MIT licensed. Hiding concepts credit @4ian/hide-spotify-from-dock
and @michaelmitchell-bit/hide-macos-app-dock-icon (both MIT).