Research 026/04 counted two plain dmenu calls failing with dmenu installed nowhere. Measured, they are one line on each workstation: dunst's `dmenu = /usr/bin/dmenu -p dunst:`. Installing the package fixes both by existing; the line stays the dunst module's. No claim: node-launcher is not in the controller's seat table yet, and the module says so. Two Go tools: menu, shaped like that seat's verb (chosen line, index, typed, cancelled, timed out within 25 s), and session.
57 lines
2.8 KiB
Markdown
57 lines
2.8 KiB
Markdown
# dmenu
|
|
|
|
The suckless menu, as a module (novox/hq research 026/04: "`dmenu` is a module of its own (official
|
|
repositories), able to hold the same seat on a machine that wants it"; to-be 42 phase 2 step 7).
|
|
|
|
## Owns
|
|
|
|
| what | where |
|
|
|---|---|
|
|
| `dmenu`, `dmenu_run`, `dmenu_path`, `stest` | package `dmenu` (official repositories) |
|
|
|
|
## Improves: two broken calls work by existing
|
|
|
|
Research 026/04 measured "plain `dmenu` in two places" in the operator's configuration, with dmenu
|
|
installed on neither workstation, so both failed. Measured again on 2026-10-04, the two are one line on
|
|
each workstation, in the notifier's configuration:
|
|
|
|
- `~/.config/dunst/dunstrc`: `dmenu = /usr/bin/dmenu -p dunst:`
|
|
|
|
It is the menu dunst opens to pick a notification's action or link. Every other menu in the
|
|
operator's scripts calls `rofi -dmenu`. Once this module installs the package, `/usr/bin/dmenu` exists
|
|
and that menu opens. The `dunst` module may later point the line at the launcher seat's command
|
|
instead (below). The line is that module's to own, so this module does not touch it.
|
|
|
|
## The seat it would hold: not claimed yet
|
|
|
|
Research 026/04 gives `node-launcher` to `rofi`, with a dmenu-compatible command as part of its
|
|
protocol, and lets `dmenu` hold the same seat on a machine that wants it. **The seat is not in the
|
|
controller's seat table yet**, and a claim on an unknown seat is refused. So this module claims
|
|
nothing. Its tool `dmenu_menu` is shaped like the seat's `menu` verb (research 026/05): show a list,
|
|
answer the chosen line. When the seat is recorded, the claim is one line here, serving `menu`.
|
|
|
|
## Tools
|
|
|
|
All answer JSON. `(r)` reads; `(d)` acts in the operator's session.
|
|
|
|
| tool | what |
|
|
|---|---|
|
|
| `dmenu_menu` (d) | show up to 1000 choices, with a prompt, as one line or a vertical list, case-insensitive by default. Answers the chosen line and its index; a typed line that is not a choice (`typed`); `cancelled` when dismissed; `timed_out` when not answered in time (default 20 s, at most 25, below the runtime's 30 s call limit) |
|
|
| `dmenu_session` (r) | the session the menu would appear in and how it was found, or why there is none; dmenu's version |
|
|
|
|
**Reaching the session** works as the `xclip` module's README describes: the runtime runs as the
|
|
account with no session words, and `session.go` finds the account's display and cookie from its own
|
|
processes. With no session, the tool says so and shows nothing. A keyboard held by another program
|
|
(a locked screen, an open menu) is answered as such.
|
|
|
|
The menu draws in fontconfig's `monospace` at dmenu's default size, which the `fonts` module makes
|
|
JetBrains Mono Nerd Font.
|
|
|
|
## What changes when it is assigned
|
|
|
|
On both workstations, the `dmenu` package is installed, which neither has today. Nothing else.
|
|
|
|
## Leaves as found
|
|
|
|
The notifier's configuration, and every `rofi -dmenu` call in the operator's scripts.
|