A sun for your laptop. Click it and your laptop stays awake; click it again and it sleeps as usual.
It asks Windows or macOS to stay awake, the same way a video player does.
No fake keypresses, no mouse jiggling, and it stops the moment you turn it off.
Jump to · Install · A tour · Themes · How it works · Docs
| Section | What it covers |
|---|---|
| The idea | Why it asks the system, and why a sun |
| At a glance | Everything it does, in one table |
| Install | Windows and macOS, and what the installer looks like |
| A tour in pictures | Home, the Almanac, Settings, History, AI, updates |
| Themes | All twenty-six palettes, each on the same horizon |
| How it works | The engine, the sun's states, one click end to end |
| What it never does | The promises, and where each is kept |
| Use | The short version of the field guide |
| Development | Build it, test it, where things live |
| Documentation | Every doc, and what to read it for |
This started as a script that pressed a key every few minutes; it is still in
legacy/. It worked, and it was wrong: it typed into whatever had
focus, it ran in a console, and Windows had no idea why the laptop never slept.
Keep me awake holds a Windows power request (on a Mac, an IOKit power assertion):
the API the system provides for exactly this. It shows up by name in powercfg /requests or
pmset -g assertions, and it is released the instant you turn the sun off or quit the app.
|
The whole app is one button: a sun on a horizon. While the sun is up, your laptop stays awake. Click it and the sun goes down, and your laptop sleeps as usual. Set a timer and you can watch the sun sink as the time runs out. |
One small process in the tray (the menu bar on a Mac), about 5 MB on Windows, that never polls. The window only exists while it is open, and is freed when you close it. |
No account and no tracking. Nothing goes over the network unless it is checking for updates or you ask an AI feature something. What it records about your days stays in a file on your machine. AI is off until you turn it on, with your own key. |
| Area | What you get |
|---|---|
| Control | One sun. Click it, press Space, or use the tray (the menu bar on a Mac). |
| Hotkey | Ctrl+Alt+K (⌥⌘K on a Mac) turns it on or off from any app; you can pick your own keys. |
| Time | Stay awake for 30m · 1h · 2h · 4h · 8h, or until a time of day. A few minutes before the time runs out it warns you, so you can add 30 minutes. |
| Schedule | Stays awake during set hours on set days; outside them the laptop sleeps as usual. |
| Stay awake while | It keeps the laptop awake on its own while an app runs, a download or upload is going, the processor is busy, something is full screen, a monitor is plugged in, or it is on mains power. You pick which. |
| When it ends | After a timer, the schedule or one of those ends, it can lock the screen, turn it off, or put the laptop to sleep, but only if you've been away for a minute. |
| Battery | Stops keeping it awake below a battery level (20% by default), or whenever unplugged; starts again when you plug in. On battery it says how long the charge will last. A desktop is offered no battery rules. |
| Overnight | Left on Always with no input for hours, it asks if you are still there, then lets the laptop sleep. If you like, it can also let the laptop sleep when you leave for the night and turn back on when you return. |
| Almanac | A diary it keeps for you: the hours you worked each day, extra hours, days off, and when you were away overnight, worked out from when you used the keyboard and mouse. |
| AI, if you want it | A sentence about your day, a few about your week, answers to questions about your month, and timers typed in plain words ("until 6:30 pm"). Claude, OpenAI or any compatible service, with your own key. Off by default. |
| Themes | Paper and Night, plus twenty-four more: colour schemes from code editors, places, and loud ones. Or make your own. |
| Wide window | Ctrl+E (⌘E on a Mac) opens the whole day drawn as a horizon, each time it kept the laptop awake a dome of light, with what it is watching and the week underneath. |
| Small things | A sun drawn to suit its theme, tonight's moon, your own theme to share as one line of text, a separate evening theme, a mini window, a year in review, a printable month, and ? for all keyboard shortcuts. All twelve. |
| Tray | Left click opens the window; right click opens a menu with everything else. Starts quietly when you sign in. |
| Command line | keepmeawake --for 2h, --until 18:30, --off, --status, and --run make to stay awake while a command runs. |
| Updates | Checks GitHub once a day and when you ask; installs only when you say. |
| Footprint | About 5 MB in the tray on Windows, 16 MB on a Mac. By default, the window takes no memory while it is closed. |
| System | Get | Notes |
|---|---|---|
| Windows 10 (1809+) and 11 | the -setup.exe from the latest release (or the .msi) |
per user, no administrator rights |
| macOS 12+ on Apple Silicon | the .dmg; drag the sun to Applications |
not notarized yet, so macOS asks once: the steps |
| From source | Development | Node 22+, Rust 1.90+ |
The Windows setup uses the same horizon as the app, and says plainly what it is installing:
Every pane, in Paper and in Night.
The sun is the switch. Under it: today's hours as a strip, what the laptop is doing right now, a row of lengths to choose from (30m, 1h, … Until…), and two switches for the screen and the battery.
A schedule keeps it awake during your hours. Left on overnight with no one around, it asks if you are still there before it lets the laptop sleep.
The whole day across the window: each time it kept the laptop awake rises from the horizon as a dome of light, as tall as it was long, and the sun stands at now. Under it, what it is doing, what it is watching, and the week.
The open book in the title bar. It records your working hours, days off and nights away, from when you used the keyboard and mouse; there is nothing to start or stop. Weekends count as days off, a missed working day counts as leave, and a weekday you never work stops counting as leave on its own.
The month is a calendar: a bar under each day worked, a ring for leave, the sun on today. You can correct any day by hand.
Everything has a sensible default, so you can click the sun without setting anything first.
Extras you never need but might enjoy: suns drawn to match their theme, the moon as it is tonight, a theme of your own, all keyboard shortcuts on one sheet, the credits, and a year in review:
The mini window shows just the sun, above your other windows, and a month prints as a timesheet:
The last thirty times it kept your laptop awake, and notifications for the moments you choose.
Nothing is sent until three things are true, and you can see each one: you added a key of your own, the main AI switch is on, and that feature's own switch is on. Every feature says what it sends, and to whom, before you click.
Settings → Theme. A theme changes the colours and nothing else: everything stays where it is, and the sun is still the one bright spot. A test checks every theme, so the text is readable and the sun stands out in all of them.
Paper for daytime, Night for after dark. System follows your light or dark mode, switching between the two whenever Windows or macOS does.
![]() Paper warm paper, one sun |
![]() Night the same horizon after dark |
Colour schemes from code editors, which you may already know.
![]() Solarized Light |
![]() Solarized Dark |
![]() Gruvbox |
![]() Nord |
![]() Dracula |
![]() Catppuccin |
![]() Tokyo Night |
![]() Monokai |
The same horizon, somewhere else: an old terminal, a blueprint, a handheld game, the sea floor.
Bright and bold, on purpose.
Rust owns the behaviour; the Svelte window is a view over one Snapshot. The full picture
is in docs/architecture.md.
%%{init: {"theme": "base", "themeVariables": {"fontFamily": "Georgia, serif", "primaryColor": "#f4f0e7", "primaryTextColor": "#1c1b18", "primaryBorderColor": "#1c1b18", "lineColor": "#9a948a", "secondaryColor": "#ebe6da", "tertiaryColor": "#dfe8ea", "clusterBkg": "#ebe6da", "clusterBorder": "#cdb98c", "edgeLabelBackground": "#f4f0e7", "actorBkg": "#f4f0e7", "actorBorder": "#1c1b18", "actorTextColor": "#1c1b18", "signalColor": "#9a948a", "signalTextColor": "#9a948a", "labelBoxBkgColor": "#ebe6da", "labelBoxBorderColor": "#cdb98c", "labelTextColor": "#1c1b18", "loopTextColor": "#9a948a", "noteBkgColor": "#dca544", "noteTextColor": "#1c1b18", "noteBorderColor": "#1c1b18", "activationBkgColor": "#dca544", "activationBorderColor": "#1c1b18", "transitionColor": "#9a948a", "transitionLabelColor": "#9a948a", "stateLabelColor": "#1c1b18", "stateBkg": "#f4f0e7", "compositeBackground": "#ebe6da", "altBackground": "#ebe6da", "compositeTitleBackground": "#dfe8ea", "innerEndBackground": "#1c1b18", "specialStateColor": "#dca544"}}}%%
flowchart LR
You(("You")):::sun
subgraph app ["One native process"]
Tray["Tray icon"]
Engine["Engine thread<br/>one Session, one policy"]
Keeper["Almanac keeper<br/>one look a minute"]
end
UI["Svelte window<br/>exists only while open"]:::sky
OS["Power manager<br/>Windows · macOS"]
Battery["Battery"]
Idle["Last input time<br/>read only"]
You -->|sun · Space| UI
You -->|right click| Tray
You -->|hotkey| Engine
UI -->|invoke| Engine
Tray --> Engine
Engine -->|hold · release| OS
Battery -->|level · plugged| Engine
Idle --> Engine
Idle --> Keeper
Engine -->|Snapshot| UI
Engine -->|Snapshot| Tray
classDef sun fill:#dca544,stroke:#1c1b18,color:#1c1b18
classDef sky fill:#dfe8ea,stroke:#1c1b18,color:#1c1b18
%%{init: {"theme": "base", "themeVariables": {"fontFamily": "Georgia, serif", "primaryColor": "#f4f0e7", "primaryTextColor": "#1c1b18", "primaryBorderColor": "#1c1b18", "lineColor": "#9a948a", "secondaryColor": "#ebe6da", "tertiaryColor": "#dfe8ea", "clusterBkg": "#ebe6da", "clusterBorder": "#cdb98c", "edgeLabelBackground": "#f4f0e7", "actorBkg": "#f4f0e7", "actorBorder": "#1c1b18", "actorTextColor": "#1c1b18", "signalColor": "#9a948a", "signalTextColor": "#9a948a", "labelBoxBkgColor": "#ebe6da", "labelBoxBorderColor": "#cdb98c", "labelTextColor": "#1c1b18", "loopTextColor": "#9a948a", "noteBkgColor": "#dca544", "noteTextColor": "#1c1b18", "noteBorderColor": "#1c1b18", "activationBkgColor": "#dca544", "activationBorderColor": "#1c1b18", "transitionColor": "#9a948a", "transitionLabelColor": "#9a948a", "stateLabelColor": "#1c1b18", "stateBkg": "#f4f0e7", "compositeBackground": "#ebe6da", "altBackground": "#ebe6da", "compositeTitleBackground": "#dfe8ea", "innerEndBackground": "#1c1b18", "specialStateColor": "#dca544"}}}%%
stateDiagram-v2
direction LR
[*] --> Resting
Resting --> Awake: click · Space · hotkey
Awake --> Resting: click again
Awake --> Resting: the timer runs out
Awake --> Paused: battery low, or unplugged
Paused --> Awake: plugged in again
Paused --> Resting: click
Awake --> Asking: overnight, nobody there
Asking --> Awake: still here
Asking --> Resting: no answer
Resting --> Awake: a schedule window opens
%%{init: {"theme": "base", "themeVariables": {"fontFamily": "Georgia, serif", "primaryColor": "#f4f0e7", "primaryTextColor": "#1c1b18", "primaryBorderColor": "#1c1b18", "lineColor": "#9a948a", "secondaryColor": "#ebe6da", "tertiaryColor": "#dfe8ea", "clusterBkg": "#ebe6da", "clusterBorder": "#cdb98c", "edgeLabelBackground": "#f4f0e7", "actorBkg": "#f4f0e7", "actorBorder": "#1c1b18", "actorTextColor": "#1c1b18", "signalColor": "#9a948a", "signalTextColor": "#9a948a", "labelBoxBkgColor": "#ebe6da", "labelBoxBorderColor": "#cdb98c", "labelTextColor": "#1c1b18", "loopTextColor": "#9a948a", "noteBkgColor": "#dca544", "noteTextColor": "#1c1b18", "noteBorderColor": "#1c1b18", "activationBkgColor": "#dca544", "activationBorderColor": "#1c1b18", "transitionColor": "#9a948a", "transitionLabelColor": "#9a948a", "stateLabelColor": "#1c1b18", "stateBkg": "#f4f0e7", "compositeBackground": "#ebe6da", "altBackground": "#ebe6da", "compositeTitleBackground": "#dfe8ea", "innerEndBackground": "#1c1b18", "specialStateColor": "#dca544"}}}%%
sequenceDiagram
actor You
participant UI as Window
participant Engine
participant OS as Power manager
You->>UI: click the sun
UI->>Engine: start(Always)
Engine->>Engine: policy: session on, battery allows
Engine->>OS: hold a system request (and display)
Note over OS: listed by name in powercfg /requests
Engine-->>UI: Snapshot
UI-->>You: the sun rises
You->>UI: click again
UI->>Engine: stop
Engine->>OS: release
Engine-->>UI: Snapshot
%%{init: {"theme": "base", "themeVariables": {"fontFamily": "Georgia, serif", "primaryColor": "#f4f0e7", "primaryTextColor": "#1c1b18", "primaryBorderColor": "#1c1b18", "lineColor": "#9a948a", "secondaryColor": "#ebe6da", "tertiaryColor": "#dfe8ea", "clusterBkg": "#ebe6da", "clusterBorder": "#cdb98c", "edgeLabelBackground": "#f4f0e7", "actorBkg": "#f4f0e7", "actorBorder": "#1c1b18", "actorTextColor": "#1c1b18", "signalColor": "#9a948a", "signalTextColor": "#9a948a", "labelBoxBkgColor": "#ebe6da", "labelBoxBorderColor": "#cdb98c", "labelTextColor": "#1c1b18", "loopTextColor": "#9a948a", "noteBkgColor": "#dca544", "noteTextColor": "#1c1b18", "noteBorderColor": "#1c1b18", "activationBkgColor": "#dca544", "activationBorderColor": "#1c1b18", "transitionColor": "#9a948a", "transitionLabelColor": "#9a948a", "stateLabelColor": "#1c1b18", "stateBkg": "#f4f0e7", "compositeBackground": "#ebe6da", "altBackground": "#ebe6da", "compositeTitleBackground": "#dfe8ea", "innerEndBackground": "#1c1b18", "specialStateColor": "#dca544"}}}%%
flowchart TB
app["app<br/>tray · commands · window · keeper · updater"]
engine["engine<br/>the worker thread and its policy"]:::sun
core["core<br/>session · settings · schedule · almanac<br/>no I/O"]
platform["platform<br/>power · battery · idle · clock<br/>the only unsafe code"]:::sky
app --> engine
engine --> core
engine --> platform
classDef sun fill:#dca544,stroke:#1c1b18,color:#1c1b18
classDef sky fill:#dfe8ea,stroke:#1c1b18,color:#1c1b18
%%{init: {"theme": "base", "themeVariables": {"fontFamily": "Georgia, serif", "primaryColor": "#f4f0e7", "primaryTextColor": "#1c1b18", "primaryBorderColor": "#1c1b18", "lineColor": "#9a948a", "secondaryColor": "#ebe6da", "tertiaryColor": "#dfe8ea", "clusterBkg": "#ebe6da", "clusterBorder": "#cdb98c", "edgeLabelBackground": "#f4f0e7", "actorBkg": "#f4f0e7", "actorBorder": "#1c1b18", "actorTextColor": "#1c1b18", "signalColor": "#9a948a", "signalTextColor": "#9a948a", "labelBoxBkgColor": "#ebe6da", "labelBoxBorderColor": "#cdb98c", "labelTextColor": "#1c1b18", "loopTextColor": "#9a948a", "noteBkgColor": "#dca544", "noteTextColor": "#1c1b18", "noteBorderColor": "#1c1b18", "activationBkgColor": "#dca544", "activationBorderColor": "#1c1b18", "transitionColor": "#9a948a", "transitionLabelColor": "#9a948a", "stateLabelColor": "#1c1b18", "stateBkg": "#f4f0e7", "compositeBackground": "#ebe6da", "altBackground": "#ebe6da", "compositeTitleBackground": "#dfe8ea", "innerEndBackground": "#1c1b18", "specialStateColor": "#dca544"}}}%%
flowchart LR
Click(["You click a feature"]):::sun --> Key{"A key of your own?"}
Key -- no --> Locked["Shown locked<br/>nothing is sent"]
Key -- yes --> Master{"Use AI on?"}
Master -- no --> Off["Shown off<br/>nothing is sent"]
Master -- yes --> Feature{"This feature on?"}
Feature -- no --> Off
Feature -- yes --> Send["One request<br/>only what the feature says"]:::sky
Send --> Answer["A line or two back"]
classDef sun fill:#dca544,stroke:#1c1b18,color:#1c1b18
classDef sky fill:#dfe8ea,stroke:#1c1b18,color:#1c1b18
| It never | Because |
|---|---|
| types, clicks or moves anything | it holds a power request; input injection is ruled out by ADR 0002 |
| keeps the laptop awake after you turn it off | the request is released when you turn it off or quit, and the system drops it if the app crashes |
| drains your battery without asking | it pauses below 20% by default, or whenever unplugged if you choose |
| phones home | nothing goes over the network except the update check and AI features you click |
| sends your days anywhere | the almanac is a file on your machine; AI gets only what a feature says, when you click it |
| shows your API key again | it goes into Windows Credential Manager or the macOS Keychain, and never back to the window |
| installs an update on its own | it tells you one exists; you say when |
The field guide covers every control, including the things that are not labelled. The short version:
| Want to… | Do… |
|---|---|
| keep the laptop awake | click the sun, or press Space |
| for a fixed time | pick a length (30m, 1h, …) in the row under the status |
| until a time of day | pick Until… and type a time |
| let it sleep again | click the sun again |
| keep it awake during working hours | Settings → Schedule |
| turn it on or off from another app | Ctrl+Alt+K (⌥⌘K on a Mac) |
| get the window out of the way | Esc or ×; it keeps running in the tray (the menu bar on a Mac) |
| do all of this without a window | right-click the sun in the tray or menu bar |
| change settings | the sliders icon in the title bar, or Ctrl+, (⌘, on a Mac) |
| see your days, hours and leave | the open book in the title bar: the Almanac |
| change the theme | Settings → Theme |
Where it keeps things
| What | Windows | macOS |
|---|---|---|
| Settings, almanac, history | %APPDATA%\dev.bajpai.keepmeawake\ |
~/Library/Application Support/dev.bajpai.keepmeawake/ |
| Logs | %LOCALAPPDATA%\dev.bajpai.keepmeawake\logs |
~/Library/Logs/dev.bajpai.keepmeawake/ |
| API key, if you add one | Credential Manager | Keychain |
Prerequisites: Node 22+, Rust stable 1.90+, and the MSVC build tools with a Windows SDK or, on a Mac, the Xcode Command Line Tools. The development guide has the setup for both, the daily commands and the conventions.
npm install # also wires the git hooks
npm run dev # Vite + Tauri dev build; the UI hot-reloads
npm run verify # lint, type-check and test both halves
npm run build # installers (or .app and .dmg) in src-tauri/target/release/bundleWhere things live
| Path | What |
|---|---|
src-tauri/src/core/ |
sessions, settings, schedule, almanac: pure, no I/O |
src-tauri/src/engine/ |
the worker thread and its policy |
src-tauri/src/platform/ |
power, battery, idle and clock per OS; the only unsafe |
src-tauri/src/app/ |
tray, commands, window, almanac keeper, updater, AI |
src/lib/ |
the Svelte view: components, copy, the almanac's reading |
src/styles/ |
tokens and themes |
design/ |
SVG sources for the icons, the DMG background and the installers |
docs/ |
guide, architecture, design, specs, decisions |
| Doc | Read it for |
|---|---|
| Field guide | every control, shortcut and hidden thing |
| Architecture | layers, the engine loop, IPC, window lifecycle |
| Design | the horizon, palette, type, motion, and the reasons |
| Roadmap | what is next and what was decided against |
| Development | setup, commands, style, testing, commits |
| Releasing | versions, changelog, the release workflow |
| Resource budget | what "tiny" means and how it is kept |
| Decisions | the five choices that shaped the project |
| Specs | the spec each feature was built from |
| Handoff | where the last session stopped and where to start |
| Changelog | what changed, by version |
| Contributing | issues, pull requests, and what a change agrees to |
| Security | how to report a problem privately |
Keep me awake is mine, a personal project by Akshay Bajpai, under its own license. Use the builds, read the code, build it for yourself; copying it or publishing your own version needs a yes from me first. It comes as is and you use it at your own risk: it keeps your machine awake, and what that means for your battery, your desk or your employer's rules is yours to judge.
Keep me awake · Akshay Bajpai




















































