Skip to content

About

Keep your Windows or macOS laptop awake with one click on a sun. It asks the system the way a video player does, with no fake keypresses. Timers, a schedule, battery rules, an almanac of your working days, optional AI, 27 themes and your own. About 5 MB in the tray. Tauri, Rust, Svelte.

Topics

Resources

Contributing

Security policy

Stars

0 stars

Watchers

0 watching

Forks

Latest commit

 

History

207 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Five Keep me awake windows on one horizon: Paper awake, Night resting, the Almanac in Risograph, Mars, and Thermal



Keep me awake

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.


Download the latest release

CI Latest release Downloads Windows 10 and 11 macOS 12+ Tauri 2 Rust Svelte 5 Fake keypresses At rest Themes License

Jump to · Install · A tour · Themes · How it works · Docs


Contents

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

The idea

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.

One sun

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.

Out of the way

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.

Yours

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.

At a glance

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.

Install

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:

The Windows setup's welcome page: the horizon down the left, and a paper-coloured page that says what Keep me awake does

A tour in pictures

Every pane, in Paper and in Night.

Home

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.

Home, Paper Home, Night

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.

Home on a schedule, and asking overnight, Paper Home on a schedule, and asking overnight, Night

The wide window

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 wide window, Paper

The wide window, Night

The Almanac

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 Almanac, Paper The Almanac, Night

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.

The month, and correcting a day, Paper The month, and correcting a day, Night

Settings

Everything has a sensible default, so you can click the sun without setting anything first.

Settings, Paper Settings, Night

Almanac settings and the hotkey, Paper Almanac settings and the hotkey, Night

Small things

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:

Eight windows: a pixel sun, a ring sun, a halftone sun, the moon over Night, a theme of your own, the keyboard shortcuts, 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 mini window, and a month laid out for the printer

History and notifications

The last thirty times it kept your laptop awake, and notifications for the moments you choose.

History and notifications, Paper History and notifications, Night

AI, as a choice

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.

AI settings, and a week in words, Paper AI settings, and a week in words, Night

A plan said in a sentence, and a feature shown locked, Paper A plan said in a sentence, and a feature shown locked, Night

Updates

Checking for updates, Paper Checking for updates, Night

Themes

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.

The theme picker: four shelves of small horizons, one per theme The same picker, shown in Deep Sea

Standard

Paper for daytime, Night for after dark. System follows your light or dark mode, switching between the two whenever Windows or macOS does.

Home in the Paper theme
Paper
warm paper, one sun
Home in the Night theme
Night
the same horizon after dark

Editors

Colour schemes from code editors, which you may already know.

Home in the Solarized Light theme
Solarized Light
Home in the Solarized Dark theme
Solarized Dark
Home in the Gruvbox theme
Gruvbox
Home in the Nord theme
Nord
Home in the Dracula theme
Dracula
Home in the Catppuccin theme
Catppuccin
Home in the Tokyo Night theme
Tokyo Night
Home in the Monokai theme
Monokai

Places

The same horizon, somewhere else: an old terminal, a blueprint, a handheld game, the sea floor.

Home in the Terminal theme
Terminal
green phosphor, amber sun
Home in the Blueprint theme
Blueprint
white line on cyanotype
Home in the Pocket theme
Pocket
four greens of a handheld
Home in the Newsprint theme
Newsprint
black on white, a red sun
Home in the Risograph theme
Risograph
two inks on cream
Home in the Dial-up theme
Dial-up
grey panels, teal desktop sky
Home in the Mars theme
Mars
where the sun sets blue
Home in the Deep Sea theme
Deep Sea
something glowing below

Loud

Bright and bold, on purpose.

Home in the Vaporwave theme
Vaporwave
pink and cyan on violet
Home in the Thermal theme
Thermal
as a heat camera sees it
Home in the Negative theme
Negative
film: orange base, cyan sun
Home in the Miami theme
Miami
aqua, sand, a flamingo sun
Home in the Bubblegum theme
Bubblegum
pink, all of it
Home in the Highlighter theme
Highlighter
marker yellow, pink sun
Home in the Grape Soda theme
Grape Soda
purple, a lime sun
Home in the Hi-Vis theme
Hi-Vis
safety orange over asphalt

How it works

Rust owns the behaviour; the Svelte window is a view over one Snapshot. The full picture is in docs/architecture.md.

The parts

%%{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
Loading

The sun's states

%%{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
Loading

One click, end to end

%%{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
Loading

The layers

%%{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
Loading

AI's three locks

%%{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
Loading

What it never does

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

Use

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

Development

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/bundle
Where 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

Documentation

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

License

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

About

Keep your Windows or macOS laptop awake with one click on a sun. It asks the system the way a video player does, with no fake keypresses. Timers, a schedule, battery rules, an almanac of your working days, optional AI, 27 themes and your own. About 5 MB in the tray. Tauri, Rust, Svelte.

Topics

Resources

Contributing

Security policy

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages