Skip to content

Repository files navigation

Moka

Moka

build

A featherweight keep-awake utility for Windows, written in x86/x64 assembly.

Moka stops your machine dozing off, dimming the screen, or flipping your chat status to "away" while you are reading, watching, or stepping away for a moment. It lives in the system tray as a glass of short black, does its job invisibly, and gets out of the way. Think of it as macOS Caffeine, but tiny, Australian & for Windows.

  • Barely there. A ~24 KB native binary (mostly the multi-resolution tray icons; the code is a few hundred bytes) with no runtime, no installer and no dependencies. It sleeps in the Windows message loop at essentially 0% CPU.
  • Genuinely imperceptible. Every 40 seconds it nudges the cursor a single pixel and immediately moves it back, and holds a system wake lock. You will not see the cursor move. (/nomove keeps just the wake lock.)
  • One click to toggle. Left-click the tray icon to switch it on or off.
  • Coffee as a status light. A glass of black coffee means awake; an empty glass means off.
  • Rich hover tooltip. Hover the tray icon for a small panel showing the logo, Moka v1.0, the on/off status, and the project link.
  • Handy extras. Start-with-Windows toggle, "keep awake for 1–24 hours" (or Always) timers, and a single-instance guard so you never end up with two.

Why

The original version (see ./arch/moka.asm) was written in 2004 for Windows 2000/XP (NT5 era) to keep them awake overnight whilst doing something productive. Written in 32-bit assembly because I just wanted to learn it - and MFC, ewww! The original was around 3kb in size but had MASM fun added in.

It was also the year someone at work introduced me to a Moka Pot, I didn't get a wink of sleep for a couple of days and so we called it Moka.

The modern one was prettied up and cleaned up by Claude - who also graciously created the icons (see tools/generate_icons.py).

Quickstart

You need flat assembler and Python 3 with Pillow.

scoop install flat-assembler   # or grab FASM from flatassembler.net
pip install pillow             # used only to draw the tray icons
make build                     # assembles bin/moka32.exe and bin/moka64.exe
make run                       # launches the x64 build into the system tray

Then look in your system tray:

  • Left-click the icon to toggle keep-awake on/off (full glass ⇄ empty glass).
  • Hover for a tooltip with the logo, version and status.
  • Right-click for Start with Windows, Keep awake for 1/2/4 h, About and Exit.

No install step: the .exe is self-contained. Copy it wherever you like, or drop a shortcut in your Startup folder to have it run at login.

Builds

Target Output Runs on
make build32 bin/moka32.exe 32- and 64-bit Windows
make build64 bin/moka64.exe 64-bit Windows

Run make help for the full target list.

Releases

Every merge to main runs the build workflow, which assembles both architectures and publishes a GitHub release (v1.0.<build>) with moka32.exe and moka64.exe attached. Grab the latest from the Releases page — no build required.

Documentation

Full docs live in docs/ and build with mkdocs:

mkdocs serve

About

The shot of coffee your PC needs to stay awake.

Topics

Resources

Stars

1 star

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages