xmenu - dmenu without x11
A look at xmenu, a dmenu alternative that works without X11.
xmenu is a lightweight menu utility inspired by dmenu. Unlike dmenu, it does
not depend on X11, so it runs on Wayland and other non-X environments.
MDX lets you use JSX and exported values inline. This post is about xmenu v0.5.0 and was published on Tue Sep 08 2026.
What is xmenu
xmenu renders a menu of items to standard output. You pipe a list of entries in,
it shows a menu, and prints the selected line back — classic dmenu behaviour,
but without the X11 dependency. The exported version above renders inline here
too: 0.5.0.
How it differs from dmenu
- No X11 or XWayland dependency.
- Pairs well with Wayland compositors such as
swayorhyprland. - Keeps the same keyboard-driven workflow.
A note on writing posts
Note
Headings in the body start at ##. The page title is already an <h1> from
frontmatter, so leaf sections below should use ### (h3), never #.
Warning (Check the config)
Callouts like this one, $...$ / $$...$$ math, and expressive code frames are
all wired up in astro.config.ts.
Installation
Build it from source and put the binary on your PATH:
git clone https://github.com/example/xmenucd xmenumake && sudo make installA small TypeScript example, with line numbers enabled:
import { pick, run } from "./xmenu";
const items = ["firefox", "kitty", "code"];const choice = await pick(items, { prompt: "run:" });
if (choice) { await run(choice.split(/\s+/)[0]);}Math
Inline math renders with Temml: . Display math uses a block:
Current status
| Field | Value |
|---|---|
| Input | line-based menu entries |
| Output | selected entry to stdout |
| Deps | none (no X11) |
| License | MIT |
Stay tuned for the full write-up.