Commit 8dc6669
committed
feat(desktop): add amphetamine-style keep-awake for mac/computer
- Add `KeepAwakeController` module to hold OS power assertion (idle + system sleep) via the `keepawake` crate, blocking idle sleep while display sleep remains allowed
- Add keep-awake checkbox to Settings control window with platform-specific label ("Keep Mac awake" on macOS, "Keep computer awake" elsewhere)
- Add keep-awake toggle to tray menu as a `CheckMenuItem` for quick access
- Persist keep-awake preference in `desktop-prefs.json` and restore on launch
- Show lightning badge overlay on tray icon when keep-awake is enabled, with corresponding tooltip ("Stitch — keeping awake")
- Update control UI HTML and state-sync script to include keep-awake state
- Release keep-awake assertion on app quit
- Add `keepawake` 0.6 as optional dependency (gated behind `desktop` feature)
- Update installation docs to explain the feature and its persistence behavior
- Add unit tests for badge rendering and controller state management1 parent d03cb48 commit 8dc6669
9 files changed
Lines changed: 912 additions & 29 deletions
File tree
- docs
- src/bin/stitch-desktop
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | | - | |
| 1 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | | - | |
| 1 | + | |
0 commit comments