Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Releases: onlywsx/Caffeine

Caffeine 1.6.6

Choose a tag to compare

@onlywsx onlywsx released this 22 Jun 10:15

Caffeine 1.6.6

Changed

  • "Start at login" service is now a single concrete LoginItemService (@MainActor, @Observable) injected into CaffeineViewModel like the other services (SleepPreventionManager, ActivitySimulator). The LoginItemService protocol, LiveLoginItemService, FakeLoginItemService, and the \.loginItem environment key are gone. Previews construct LoginItemService(inMemoryWith: .disabled) and pass it via the view-model initializer; the runtime path queries SMAppService.mainApp on launch and on every setEnabled(_:) call.
  • Menu bar icons now use SF Symbols for both states. Active: leaf.fill. Inactive: leaf. The active and inactive asset images are no longer referenced by the app. SF Symbols are provided by Apple free of charge for use inside apps, including commercial and App Store distribution — no licence fee, no attribution required.

Added

  • Settings window now has a four-tab layout: General (core behaviour preferences), Power (display sleep, power adapter, and battery preferences), Keyboard (global toggle shortcut), and About (app version, description, GitHub link, Check for Updates).
  • Global toggle shortcut in Settings → Keyboard. By default the shortcut is ⌘⇧C (Command+Shift+C); the user can record any key combination and disable/enable the shortcut from the Keyboard tab. The shortcut is registered via Carbon's RegisterEventHotKey API so it works system-wide, even when Caffeine is not the frontmost app, and does not require Accessibility permission.
  • "Check for Updates" moved from the menu bar item to the About tab.
  • "Start at login" preference in Settings → General. When enabled, Caffeine registers itself with SMAppService.mainApp so it launches automatically on user login. Default is off.
  • "Allow display to sleep" preference in Settings → Power. When enabled (the default), Caffeine holds only the system idle assertion so the display can sleep on its normal schedule while the Mac stays awake. When disabled, Caffeine holds the stricter display assertion that also keeps the display awake.
  • "Activate when power adapter is connected" preference in Settings → Power. When enabled, Caffeine automatically activates when a power adapter is connected. Default is off.
  • "Deactivate when power adapter is disconnected" preference in Settings → Power. When enabled, Caffeine automatically deactivates when the power adapter is disconnected. Default is off.
  • "Deactivate on low battery" preference in Settings → Power with a configurable threshold slider (5–50 %, default 20 %). When enabled, Caffeine automatically deactivates when the internal battery drops below the threshold. Desktop Macs without a battery are unaffected.

Fixed

  • "Allow display to sleep", "Activate when power adapter is connected", "Deactivate when power adapter is disconnected", "Deactivate on low battery" toggles and the low-battery threshold slider could not be toggled/adjusted. Their custom Binding closures called view-model methods without first writing the new value back to SettingsModel, so the getter always returned the stale value and SwiftUI reverted the control.
  • "Default duration" preference in Settings → General now takes effect within the current session, not only on the next app launch. Previously, CaffeineApp and CaffeineViewModel each constructed their own SettingsModel, so a Picker change in the Settings window updated the app's instance while the view model read the stale copy. CaffeineViewModel now receives the shared instance via injection, and the parameter is non-optional to prevent the same mistake from recurring.

Removed

  • First-launch pop-up of the Settings window (and its associated "Show this message when starting Caffeine" preference). Users open Settings themselves from the menu bar via Settings….
  • Suppression of the keyboard focus ring on the Settings tab bar and on form controls; SwiftUI's default focus indicator is now shown.

Changed (additional)

  • Menu bar item label renamed from Preferences… to Settings… in every supported language. Updated across all 14 Localizable.strings files (en, zh-Hans, de, ja, ko, es, fr, it, nl, pt, pt-BR, ru, uk) and the source string in MenuBarContentView.swift.
  • Renamed the view files in Classes/Views/ to follow the *View convention: GeneralSettings / AboutSettings / MenuBarContent are now GeneralSettingsView / AboutSettingsView / MenuBarContentView.
  • Menu bar inactive icon is now a coffee bean (with a central groove) instead of an empty cup, so the two states are clearly different shapes rather than "full cup vs empty cup" variants.
  • Settings window minimum width and default size widened from 380pt to 440pt so toggles and labels no longer hug the edge.
  • Settings window now uses the native Settings { TabView { Tab { ... } } } API (macOS 14+), removing the custom tab buttons and the SettingsTabButtonStyle workaround. Tab theming now follows the system appearance automatically.
  • All user preferences are now read and written through a single SettingsModel (@Observable), replacing scattered UserDefaults.standard.bool(forKey:) calls in CaffeineViewModel and per-view @AppStorage bindings.
  • AppDelegate no longer observes NSApp.effectiveAppearance to force-update window appearance; system default behaviour is relied upon instead.
  • The "About" tab now uses Form with .formStyle(.grouped) for visual consistency with the "General" tab.
  • Shared state (SettingsModel, CaffeineViewModel, LoginItemService) is now provided to views via SwiftUI's @Environment mechanism instead of constructor parameters. CaffeineApp attaches each value at the scene level using .environment(...), and the views read them with @Environment(Type.self) (for @Observable models) or @Environment(\.loginItem) (for the service, via the new @Entry). This eliminates the last places where a default-parameter constructor could silently create a divergent instance, and matches Apple's recommended pattern for @Observable types.

⚠️ Install note (ad-hoc signed, not notarised)

This build is signed with an ad-hoc certificate and has not been notarised by Apple. macOS Gatekeeper will block the first launch with a message such as "Caffeine.app cannot be opened because it is from an unidentified developer".

To open it:

  1. Locate Caffeine.app in Finder (do not open it from the archive).
  2. Right-click (or Control-click) the app and choose Open from the context menu.
  3. Click Open in the dialog that appears.

After this, macOS remembers your choice and you can launch the app normally (including double-click) thereafter. If Gatekeeper refuses, you can also remove the quarantine attribute from the extracted app:

xattr -dr com.apple.quarantine /Applications/Caffeine.app

Asset

  • Caffeine-1.6.6.zip (6.3 MB) — ad-hoc signed .app bundle
  • SHA-256: 9e049cf19a8e569ea061388cc65650f85d93bc25ae9b0cb80922475be902e04a

Auto-update

This release is not published to the Sparkle appcast (https://dr-caffeine-mac.s3.amazonaws.com/appcast.xml). Existing 1.6.5 installations will not be auto-updated to 1.6.6. Download and install manually from this release.

Caffeine 1.6.5

Choose a tag to compare

@onlywsx onlywsx released this 16 Jun 17:18

Caffeine 1.6.5 (2026-06-16)

Fixed

  • Right-click on the menu bar icon no longer fails to show the context menu on macOS 27. On macOS 27 the system no longer delivers right-mouse events to NSStatusBarButton at the AppKit layer, so the context menu is now intercepted via a session-level CGEventTap. This requires the user to grant Caffeine accessibility permission on first run (System Settings → Privacy & Security → Accessibility).
  • Timer no longer stays active and shows negative seconds after the Mac sleeps past the activation period.

Changed

  • Improved Ukrainian translation.
  • The time-remaining countdown is now displayed live at the top of the right-click context menu without rebuilding the menu on every tick.
Morty Proxy This is a proxified and sanitized view of the page, visit original site.