toki83w/dmenu: The Tiny Launcher That Treats Configuration Like Code
A pre-patched fork of dmenu that uses fuzzy matching, centered layout, and compile-time theming to prove that small tools can still feel personal, fast, and complete.
- toki83w/dmenu is interesting because it treats configuration as a source change, not a runtime preference panel.
- The fork adds fuzzy matching, centered placement, and visual theming without giving up the tiny stdin to stdout model that makes dmenu powerful.
- Its real advantage is composability: the launcher stays simple enough to serve as a building block for many workflows.
- The project argues that modern does not have to mean layered, stateful, or difficult to audit.
The fork makes a strong claim before you even open the code: some software gets better by refusing to grow a settings UI. `toki83w/dmenu` is a personal, pre-patched version of a classic X11 launcher, and that matters because its features are not bolted on after the fact. They are compiled into the program itself.
Why this fork exists
Stock `dmenu` already has a clear philosophy. This fork leans into it harder. Instead of pretending to be a general desktop suite, it reads like one developer’s answer to a familiar question: what if the launcher were already in the exact shape you wanted, every time you built it?
That is the real hook. Not a menu. A stance. In Suckless land, the ideal configuration is often a patchset plus a `config.def.h` file, and this repository follows that logic closely.
What changed from stock dmenu
| Aspect | Stock dmenu | toki83w/dmenu |
|---|---|---|
| Configuration model | Edit C headers and rebuild | Still compile-time, but with the preferred patches already fused in |
| Matching style | Usually prefix-based | Fuzzy matching for approximate queries |
| UI placement | Default bar-style placement | Centered layout for a more modal feel |
| Theming approach | Hand-edited color constants | Catppuccin palette baked into the build |
| Feedback | Plain list behavior | Numeric counters for filtered results |
| Best use case | Minimal launcher baseline | A tuned personal launcher for daily keyboard workflows |
The whole app is a pipe
The simplest way to understand `dmenu` is to stop thinking of it as a launcher. It is a filter. It takes lines on `stdin`, turns them into navigable items, narrows them as you type, and writes the selected result back to `stdout`.
/* Conceptual shape of the data flow */
while (fgets(buf, sizeof buf, stdin)) {
append_item(buf);
}
for (;;) {
read_keyboard();
match_items(query);
drawmenu();
if (selected)
break;
}
puts(selected->text);
That model explains why the tool feels so light. There is no service, no indexer, no background database. The app does one pass over input, updates state in memory, and exits when the choice is made.
Why compile-time configuration still matters
`dmenu` uses the Suckless pattern: edit `config.def.h`, rebuild, move on. It is inconvenient in the way a good workbench is inconvenient. You have to touch the tool to change it, which also means you know exactly what changed.
That tradeoff is the point. Runtime configuration usually buys flexibility, but it also adds parsing, validation, schema drift, and a larger surface area for things to go wrong. Compile-time configuration reduces that surface and keeps the binary honest about what it is.
| Tradeoff | Compile-time config | Runtime config |
|---|---|---|
| Changing behavior | Requires rebuild | Changes live through settings files or UI |
| Complexity | Low | Higher |
| Discoverability | Lower | Higher |
| Auditability | Very high | Depends on layers and defaults |
| User type | People comfortable editing source | People who want immediate toggles |
In this fork, that philosophy is not softened. `centered`, `fuzzy`, `SchemeNorm`, and `SchemeSel` are not preferences stored elsewhere. They are the program.
The important internals
The codebase is compact enough to read in one sitting, but each file has a clear job. `dmenu.c` handles events, matching, and drawing. `drw.c` and `drw.h` abstract X11 drawing. `util.c` gives the project its fail-fast memory helpers. `stest.c` supports the shell workflow around `dmenu_run` and `dmenu_path`.
| File | Role | Why it matters |
|---|---|---|
| dmenu.c | Event loop and matching | This is where stdin becomes a live menu |
| drw.c / drw.h | Drawing layer | Keeps Xlib details out of the main logic |
| config.def.h | UI constants and feature toggles | Defines the fork’s personality |
| util.c / util.h | Memory and error helpers | Keeps the code small and blunt |
| stest.c | File test helper | Supports fast PATH scanning |
The key data structure is the `struct item` list. Each item carries the text to show, links to neighboring items, and enough state to support ranking and navigation. That makes the menu feel immediate, because the renderer is always working with a simple in-memory model rather than a separate index layer.
The matching logic is just as direct. Prefix search is easy to reason about, but fuzzy matching is what makes a launcher feel forgiving. The fork uses that flexibility without turning the program into a search engine.
What modern launchers trade away
A richer launcher can be prettier, more discoverable, and easier for newcomers to pick up. It can also become harder to predict. Once a tool starts depending on plugins, runtime state, or background services, the user often gets convenience at the cost of clarity.
`toki83w/dmenu` sits on the other side of that line. It gives up animation, rich indexing, and a broad settings surface. In return, it stays composable, transparent, and extremely easy to script around.
| Category | toki83w/dmenu | Typical modern launcher |
|---|---|---|
| Startup behavior | Instant and simple | Often heavier and more layered |
| Customization | Edit source and rebuild | Use settings, themes, and plugins |
| Integration | Best through pipes and scripts | Best through built-in features |
| Mental model | One filter, one output | Many modes and screens |
| Long-term feel | Stable and legible | Feature-rich but more complex |
That is why this fork still feels relevant. It is not nostalgia. It is a reminder that a tool can be small, opinionated, and complete without trying to become a platform.
Why this still feels relevant
The lasting lesson is not that everyone should compile their launcher. It is that constraints can produce better software when the constraints are chosen well. `toki83w/dmenu` takes a classic Unix utility and shows that modernization does not have to mean abstraction inflation.
Sometimes the most modern-feeling interface is the one that stays closest to the machine, the shell, and the user’s own habits.





