Skip to content

fix(menubar): show Keep Awake on Macs without a battery - #13

Merged
WolffTech merged 2 commits into
mainfrom
fix/no-battery-coffee-menu
Oct 16, 2026
Merged

WolffTech merged 2 commits into
mainfrom
fix/no-battery-coffee-menu

Conversation

@WolffTech

Copy link
Copy Markdown
Owner

On a Mac without a battery, the Keep Awake cup never made it into the combined menu bar item, and it couldn't be reordered. The cup was drawn as a badge on the battery widget. When there was no battery widget, Barometry added a separate status item for it outside the module system. Hiding the Battery module on a laptop caused the same problem.

Keep Awake is now a regular menu bar module that appears only while Keep Awake is on:

  • Combined layout: the cup sits inside the combined item, in the order you set in Settings.
  • Individual layout: the cup gets its own item that you can ⌘-drag like any other. Turning Keep Awake on or off no longer recreates every menu bar item.
  • Battery: the battery widget no longer carries the cup badge, so the cup shows up in one place only.
  • Settings: Keep Awake is listed with the other modules, labelled "Shown while Keep Awake is on". It doesn't count as the one item that must stay visible, because it disappears when Keep Awake is off.

⌥-clicking any Barometry item now toggles Keep Awake. It used to work only on the battery item, so Macs without a battery could only turn Keep Awake on from the dashboard.

Testing

  • swift test in Packages/BarometryKit passes. New tests cover when Keep Awake is shown, its position in the module order, and that it can't be the last module left visible.
  • A Debug build of the app succeeds.
  • Rendered the menu bar view offscreen to check the cup beside other widgets and on its own.
  • Not yet checked by hand in the running app.

- Add a keepAwake module shown only while Keep Awake is on
- Show the cup in the combined item in the user's chosen order
- Give it a ⌘-draggable individual item like other modules
- Remove the fallback status item and the battery badge
- Keep at least one module that doesn't depend on Keep Awake
- Reuse status items still wanted instead of recreating all
- Let Macs without a battery turn on Keep Awake from the menu bar
- Update the settings footer and README to match
@WolffTech
WolffTech merged commit 9027f5e into main Oct 16, 2026
2 checks passed
@WolffTech
WolffTech deleted the fix/no-battery-coffee-menu branch November 10, 2026 20:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant