feat(menu): adopt rofi plugins for calc, files, emoji
Replace the hand-rolled calc/files modules with purpose-built rofi modi (via programs.rofi.plugins) and add an emoji picker — all themed through the same .rasi as every other modi: - calc -> rofi-calc: live results as you type via libqalculate directly, which also dodges the qalc CLI's "15% of 200" -> rem(15, 1 B) misparse. Enter copies; the menu persists to chain calculations. Drops the libqalculate (qalc CLI) dependency. - files -> rofi-file-browser-extended: live directory navigation + xdg-open, replacing the flat 50k-cap `fd` dump of $HOME. yazi (SUPER+E) stays the power browser; `fd` already ships via shell.nix. - emoji -> rofi-emoji (new module): glyph picker, copies through the plugin's Wayland clipboard adapter. Bound to SUPER+CTRL+E in keybinds.nix (so it lands in the SUPER+? cheatsheet too). rofi 2.0 rebuilds cleanly with all three plugin .so (ABI-matched, same nixpkgs). README roadmap updated: calc rework marked shipped, with a follow-up item for the script-based plugins (network/secrets/audio). Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
34
README.md
34
README.md
@@ -295,8 +295,9 @@ close · `SUPER+1..9` workspaces · `Print` region screenshot.
|
||||
`nomarchy-menu` dispatcher: root picker (no args) · `power`
|
||||
(lock/logout/suspend/hibernate/reboot/shutdown, SUPER+X) ·
|
||||
`theme` (SUPER+T) · `clipboard` (cliphist, SUPER+CTRL+V) · `calc`
|
||||
(qalc, copy/chain) · `files` (fd → xdg-open) · `web` (Google).
|
||||
SUPER+D is `rofi -show drun`.
|
||||
(rofi-calc, live, SUPER+CTRL+C) · `files` (rofi-file-browser, live
|
||||
navigation, SUPER+CTRL+F) · `emoji` (rofi-emoji, SUPER+CTRL+E) ·
|
||||
`web` (Google). SUPER+D is `rofi -show drun`.
|
||||
- ✓ shipped modules: `network` (nmtui in `$TERMINAL`) · `bluetooth`
|
||||
(blueman-manager) · `capture` (grim/slurp submenu: region/full →
|
||||
clipboard/file, saved to `~/Pictures/Screenshots`) · `keybinds` (the
|
||||
@@ -317,15 +318,26 @@ close · `SUPER+1..9` workspaces · `Print` region screenshot.
|
||||
launcher, no second theming pipeline; the dispatcher owns the menu
|
||||
structure, so the renderer stays swappable (we moved fuzzel → rofi 2.0
|
||||
once mainline gained native Wayland, for its richer theming)
|
||||
- **Calculator module rework:** the current `calc` flow
|
||||
(`modules/home/rofi.nix`) is unsatisfying — you commit the expression
|
||||
blind, then the result only appears in the *next* menu's `-mesg` line,
|
||||
and `qalc -t` misparses common phrasings (e.g. `15% of 200` →
|
||||
`rem(15, 1 B)` instead of `30`). Rework toward live results as you type
|
||||
(rofi-calc-style: each keystroke re-evaluates and the answer is the top
|
||||
entry, Enter copies), a more robust qalc invocation, and graceful
|
||||
handling of parse errors. Decide whether to keep the hand-rolled dmenu
|
||||
loop or adopt a dedicated calc mode/plugin.
|
||||
- ✓ **Menu modules from rofi plugins:** the old `calc` flow committed the
|
||||
expression blind (result only in the *next* menu's `-mesg`) and `qalc -t`
|
||||
misparsed common phrasings (`15% of 200` → `rem(15, 1 B)`, the natural-
|
||||
language "of" tripping the CLI). Resolved by adopting purpose-built rofi
|
||||
modi (`programs.rofi.plugins`), all themed through the same `.rasi`:
|
||||
- **calc** → **rofi-calc**: live results as you type via libqalculate
|
||||
directly (dodging the qalc-CLI "of" bug), Enter copies, menu persists
|
||||
to chain calculations.
|
||||
- **files** → **rofi-file-browser-extended**: live directory navigation
|
||||
(Backspace to ascend, toggle hidden) opening with xdg-open, replacing
|
||||
the flat `fd` dump of `$HOME`. yazi (SUPER+E) stays the power browser.
|
||||
- **emoji** → **rofi-emoji** (new module, SUPER+CTRL+E): glyph picker,
|
||||
copies via the plugin's Wayland clipboard adapter.
|
||||
- **More menu modules from rofi tools:** the script-based counterparts
|
||||
(run via `rofi -dmenu`, like the hand-rolled modules), each a deliberate
|
||||
replacement of an existing flow: **rofi-network-manager** (a keyboard
|
||||
wifi/VPN picker vs today's `nmtui`-in-terminal `network`), **rofi-rbw /
|
||||
rofi-pass** (a secrets module — Bitwarden via rbw, or `pass` — pairs with
|
||||
`keys.nix`), and **rofi-pulse-select** (an audio sink/source switcher).
|
||||
Decide per-module whether it earns replacing the current path.
|
||||
- **Theme parity with legacy:** summer-day/night now carry their legacy
|
||||
bar layouts as `waybar.jsonc` whole-swaps (adapted: dead legacy script
|
||||
modules dropped, Nerd-Fonts-v2 codepoints remapped to FontAwesome/v3,
|
||||
|
||||
Reference in New Issue
Block a user