Files
dotfiles/.claude/tasks/0024-rofi-launcher.md
alexion 6149fd8fa6 fix(desktop): make calc a tab-reachable mode again (task 0024)
rofi-calc shows its result in rofi's message widget, not a list entry,
so a tab-reachable calc mode renders it while a calc folded into
combi-modi does not (combi stays the active mode and drops the
sub-mode's message). List calc in modi and drop the dedicated key.
2026-07-22 16:16:50 -04:00

38 lines
3.1 KiB
Markdown

---
spec: hyprland-desktop
blocked-by: 0021-desktop-group-and-hyprland-session
---
## What to build
A search-everything launcher, so one keybound tool handles launching and utility menus.
Add a rofi (Wayland fork) module to the desktop group, enabled through the aggregator, combining application-run, binary-run, and window-switch into one prompt, plus math-evaluation and emoji modes.
Bind it on `Super+R`.
Structure it so it is reusable as the dmenu-style frontend for later utility menus (clipboard history, power menu), and provide a power menu that uses it.
## Acceptance criteria
- [x] A rofi module exists in the desktop group and is enabled by the aggregator.
- [x] rofi combines application-run, binary-run, and window-switch modes, plus math evaluation and emoji.
- [x] rofi opens on `Super+R`.
- [x] rofi is usable as a dmenu-style frontend for utility menus, and a power menu is provided through it.
- [x] neogaia builds green under `nix flake check`.
## Implementation Notes
- `rofi-wayland` no longer exists as a separate package: nixpkgs merged the Wayland fork into `pkgs.rofi` (now 2.0.0), and `rofi-emoji-wayland` into `rofi-emoji`.
The module uses the plain `pkgs.rofi`, which is the Wayland-capable build.
- The combined prompt is rofi's `combi` mode: `combi-modi = "drun,run,window"` merges the run/switch modes into one list, and `modi = "combi,calc,emoji"` adds calc (via the `rofi-calc` plugin) and emoji (via `rofi-emoji`) as the two further modes the same window tabs to.
`Super+R` runs `rofi -show combi`.
- calc is a tab-reachable mode, not a member of `combi-modi`.
rofi-calc returns its result from the mode's message widget (`_get_message`), not as a list entry.
Tabbing to the calc mode makes it active, so that widget shows the result; folding calc into `combi-modi` keeps `combi` the active mode, whose message does not carry a sub-mode's result, which is why the result was invisible in the merged list.
The Stylix rofi theme styles the `message`/`textbox` widgets and does not hide them, so the result renders without any local theme override.
- The dmenu-style reuse is the themed rofi itself, not a separate abstraction: any `rofi -dmenu` invocation reads the same config and Stylix theme, so the power menu — and later clipboard/utility menus — look uniform for free.
- The launcher and power-menu keybinds live in this module rather than in `hyprland.nix`, contributed through `settings.bind`, which the module system concatenates with the compositor's own binds in the single `hyprland.conf`.
This keeps each command next to its binding and referenced by store path, so a rename cannot silently break the bind.
- The power menu is bound to `Super+Shift+X`, chosen by the operator.
It pairs with lock on `Super+X` (a key the spec's table does list), so the two session actions sit together, and the parent spec's table has no power-menu key of its own.
- No Waybar `window-rewrite` icon mapping was added: rofi renders as a Wayland layer-shell overlay, not a tiled window with a class on a workspace, so it never appears on the workspace indicator the convention governs.