Skip to content

halfcaf 0.4.0

Choose a tag to compare

@stephenway stephenway released this 04 May 22:21
· 3 commits to main since this release
c98d137

Historical entry. Built from source via the Homebrew tap formula at the time. Binaries were not packaged until v1.0.0.

Added

  • Menu bar app (HalfcafBar.app): SwiftUI MenuBarExtra agent
    that wraps the halfcaf CLI as a subprocess. One-click engage and
    disengage, persisted toggle states (Dim, Mute, Toggle Focus),
    Launch at Login via SMAppService, and status reflection from the
    shared state.json.
  • Global hotkey ⌘⇧⎋ for blind-disengage when the screen is dark,
    registered via Carbon RegisterEventHotKey.
  • Engaged-state visual change: menu bar icon swaps from moon to
    moon.zzz.fill when a session is active.
  • Failure surfacing: stderr from the spawned halfcaf is
    captured and shown as an NSAlert if the process exits non-zero
    for any reason other than user interrupt.
  • .app bundle assembly (scripts/build-app.sh): generates
    Info.plist (LSUIElement, NSAppleEventsUsageDescription),
    programmatic AppIcon.icns from scripts/make-icon.swift, and
    bundles the CLI inside Contents/MacOS/ so a single Cask install
    provides both the GUI and the binary on PATH.
  • Release pipeline: scripts/release.sh orchestrates build,
    codesign, notarize, package CLI tarball, package DMG, optional R2
    upload. Mirrors the Pier project's structure;
    scripts/lib/notarize-common.sh and scripts/upload-to-r2.sh are
    reused verbatim from Pier.
  • CLI entitlements: automation.apple-events for osascript and
    shortcuts run. GUI gets a no-op entitlements file for hardened
    runtime.
  • Homebrew Cask draft: Casks/halfcaf.rb for brew install --cask halfcaf once the tap is published; includes a binary
    stanza so the bundled CLI is symlinked onto PATH.
  • 3 new tests: RestoreCLITests covers --status and --restore
    CLI paths.

Changed

  • Toggle Focus defaults to OFF in the menu bar. macOS Focus
    syncs across iCloud-connected devices by default; defaulting on
    surprised users by also engaging DND on iPhone/iPad. CLI behavior
    unchanged: --no-focus is still the explicit opt-out.
  • README rewritten to cover both the CLI and the bar app, with a
    dedicated section on Focus / DND iOS sync trade-offs.