feat(menu): dimmed keybind hints on menu rows (item 28c)
All checks were successful
Check / eval (push) Successful in 3m1s
All checks were successful
Check / eval (push) Successful in 3m1s
The audit flagged the root picker as six short rows in ~760px of empty width; the space now carries discoverability. menuHint renders a dimmed pango span (size small, 55% alpha) from the SAME keybinds.nix the Hyprland binds and the SUPER+? cheatsheet come from (prettyKeys), so hints can never drift. Applied to the root picker (Apps special- cased — it's rofi drun), all Tools leaves, and the System rows with direct binds; those menus pass -markup-rows. Contains-glob matching and the exact "↩ Back" row are unaffected. Verified: V0; V1 (rendered menu bash -n, spans + 3x -markup-rows present); visual — tokyo-night 1080p capture shows the hints dimmed and subordinate on normal and selected rows alike. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This commit is contained in:
@@ -69,10 +69,10 @@ further palette work graduates from slices (c)/(d) findings;
|
|||||||
headlessly at 1080p and screenshots desktop + open root menu (proven
|
headlessly at 1080p and screenshots desktop + open root menu (proven
|
||||||
on tokyo-night); per-surface punch items from the first full-res
|
on tokyo-night); per-surface punch items from the first full-res
|
||||||
review:
|
review:
|
||||||
- **rofi root menu width:** ~760px for six short left-hugging rows —
|
- ✓ **rofi keybind hints** (shipped iteration #37): dimmed pango
|
||||||
either tighten, or use the space: right-aligned `SUPER+CTRL+<key>`
|
hints on root/Tools/System rows, generated from keybinds.nix via
|
||||||
hint per row (keybinds.nix already knows them; discoverability
|
the cheatsheet's prettyKeys (single source, can't drift) —
|
||||||
win).
|
capture-verified on tokyo-night.
|
||||||
- **Icon weight mix `[human]`:** full-color Papirus icons in the
|
- **Icon weight mix `[human]`:** full-color Papirus icons in the
|
||||||
menus vs all-monochrome bar glyphs — pick: symbolic/monochrome
|
menus vs all-monochrome bar glyphs — pick: symbolic/monochrome
|
||||||
menu icons for one system, or color as the menu's identity.
|
menu icons for one system, or color as the menu's identity.
|
||||||
|
|||||||
@@ -17,6 +17,27 @@ Template:
|
|||||||
|
|
||||||
---
|
---
|
||||||
|
|
||||||
|
## 2026-07-05 — rofi keybind hints (iteration #37, item 28c)
|
||||||
|
- **Task:** item 28 slice (c) — the hint column, the audit's biggest
|
||||||
|
remaining UX item.
|
||||||
|
- **Did:** rofi.nix: menuHint builds a dimmed pango span
|
||||||
|
(size small, alpha 55%) from keybinds.nix via the cheatsheet's
|
||||||
|
prettyKeys — single source, hints can't drift from the live binds;
|
||||||
|
applied to root (Apps/Theme/Power/Keybindings; Apps special-cased,
|
||||||
|
it's rofi drun not a menu module), Tools (all eight leaves), System
|
||||||
|
(Network/Bluetooth/DND); those three menus now pass -markup-rows.
|
||||||
|
Contains-glob matching and the exact "↩ Back" match are unaffected
|
||||||
|
(labels keep their prefix; Back stays markup-free).
|
||||||
|
- **Verified:** V0; V1 rendered menu bash -n + hint spans present +
|
||||||
|
3× -markup-rows; VISUAL — tokyo-night capture: hints render dimmed
|
||||||
|
and subordinate on normal AND selected (accent) rows; Tools/System
|
||||||
|
rows correctly bare.
|
||||||
|
- **Pending:** slice-c remainder: summer-rasi placeholder dim,
|
||||||
|
latte/identity captures, icon-weight `[human]`.
|
||||||
|
- **Next suggestion:** the placeholder-dim quickie + a latte capture
|
||||||
|
in one tick; then item 28 pauses for Bernardo's icon-weight call
|
||||||
|
and the hardware eyeballs.
|
||||||
|
|
||||||
## 2026-07-05 — bar group rhythm + @muted adoption (iteration #36, item 28c)
|
## 2026-07-05 — bar group rhythm + @muted adoption (iteration #36, item 28c)
|
||||||
- **Task:** item 28 slice (c) — the two queued bar polish items.
|
- **Task:** item 28 slice (c) — the two queued bar polish items.
|
||||||
- **Did:** waybar.nix generated CSS: margin-left 14px on the three
|
- **Did:** waybar.nix generated CSS: margin-left 14px on the three
|
||||||
|
|||||||
@@ -129,6 +129,17 @@ let
|
|||||||
cheatsheetFile = pkgs.writeText "nomarchy-keybinds.txt"
|
cheatsheetFile = pkgs.writeText "nomarchy-keybinds.txt"
|
||||||
(lib.concatStringsSep "\n" cheatRows + "\n");
|
(lib.concatStringsSep "\n" cheatRows + "\n");
|
||||||
|
|
||||||
|
# Dimmed keybind hints on menu rows (item 28c) — the same keybinds.nix
|
||||||
|
# + prettyKeys the cheatsheet uses, so they can never drift from the
|
||||||
|
# live binds. Pango spans; the menus that show them pass -markup-rows.
|
||||||
|
# Empty (no hint) when a module has no direct bind.
|
||||||
|
menuHint = module:
|
||||||
|
let m = lib.filter (b: b.action == "exec, nomarchy-menu ${module}") keybinds.binds;
|
||||||
|
in lib.optionalString (m != [ ])
|
||||||
|
" <span size='small' alpha='55%'>${prettyKeys (lib.head m)}</span>";
|
||||||
|
# Apps opens rofi drun directly, not a nomarchy-menu module.
|
||||||
|
appsHint = " <span size='small' alpha='55%'>SUPER + D</span>";
|
||||||
|
|
||||||
nomarchy-menu = pkgs.writeShellScriptBin "nomarchy-menu" ''
|
nomarchy-menu = pkgs.writeShellScriptBin "nomarchy-menu" ''
|
||||||
# Nomarchy menu dispatcher — thin presentation layer over
|
# Nomarchy menu dispatcher — thin presentation layer over
|
||||||
# `rofi -dmenu`; actions delegate to nomarchy-theme-sync, systemctl,
|
# `rofi -dmenu`; actions delegate to nomarchy-theme-sync, systemctl,
|
||||||
@@ -552,16 +563,16 @@ ${themeRows}
|
|||||||
# Tools submenu — utilities you invoke. Each leaf is also reachable
|
# Tools submenu — utilities you invoke. Each leaf is also reachable
|
||||||
# directly (SUPER+CTRL+<mnemonic>); this just keeps the root short.
|
# directly (SUPER+CTRL+<mnemonic>); this just keeps the root short.
|
||||||
choice=$( {
|
choice=$( {
|
||||||
row "Calculator" accessories-calculator
|
row "Calculator${menuHint "calc"}" accessories-calculator
|
||||||
row "Clipboard" edit-paste
|
row "Clipboard${menuHint "clipboard"}" edit-paste
|
||||||
row "Emoji" face-smile-big
|
row "Emoji${menuHint "emoji"}" face-smile-big
|
||||||
row "Files" system-file-manager
|
row "Files${menuHint "files"}" system-file-manager
|
||||||
row "Web search" system-search
|
row "Web search${menuHint "web"}" system-search
|
||||||
row "Capture" applets-screenshooter
|
row "Capture${menuHint "capture"}" applets-screenshooter
|
||||||
command -v hyprpicker >/dev/null 2>&1 && row "Color picker" preferences-desktop-color
|
command -v hyprpicker >/dev/null 2>&1 && row "Color picker${menuHint "colorpicker"}" preferences-desktop-color
|
||||||
row "Ask Claude" internet-chat
|
row "Ask Claude${menuHint "ask"}" internet-chat
|
||||||
back
|
back
|
||||||
} | rofi -dmenu -show-icons -p Tools) || exit 0
|
} | rofi -dmenu -show-icons -markup-rows -p Tools) || exit 0
|
||||||
case "$choice" in
|
case "$choice" in
|
||||||
"$BACK") exec "$0" ;;
|
"$BACK") exec "$0" ;;
|
||||||
*Calc*) exec "$0" calc ;;
|
*Calc*) exec "$0" calc ;;
|
||||||
@@ -580,14 +591,14 @@ ${themeRows}
|
|||||||
# the submenu shrinks to match the hardware, like the Waybar modules.
|
# the submenu shrinks to match the hardware, like the Waybar modules.
|
||||||
bats=(/sys/class/power_supply/BAT*)
|
bats=(/sys/class/power_supply/BAT*)
|
||||||
choice=$( {
|
choice=$( {
|
||||||
row "Network" network-wireless
|
row "Network${menuHint "network"}" network-wireless
|
||||||
row "VPN" network-vpn
|
row "VPN" network-vpn
|
||||||
row "Bluetooth" bluetooth
|
row "Bluetooth${menuHint "bluetooth"}" bluetooth
|
||||||
[ -e "''${XDG_RUNTIME_DIR:-/run/user/$(id -u)}/pulse/native" ] \
|
[ -e "''${XDG_RUNTIME_DIR:-/run/user/$(id -u)}/pulse/native" ] \
|
||||||
&& row "Audio" audio-volume-high
|
&& row "Audio" audio-volume-high
|
||||||
row "Display" video-display
|
row "Display" video-display
|
||||||
command -v system-config-printer >/dev/null 2>&1 && row "Printers" printer
|
command -v system-config-printer >/dev/null 2>&1 && row "Printers" printer
|
||||||
row "Do Not Disturb" notification-disabled
|
row "Do Not Disturb${menuHint "dnd"}" notification-disabled
|
||||||
if systemctl --user is-active --quiet hyprsunset.service 2>/dev/null
|
if systemctl --user is-active --quiet hyprsunset.service 2>/dev/null
|
||||||
then row "Night light (on)" weather-clear-night
|
then row "Night light (on)" weather-clear-night
|
||||||
else row "Night light (off)" weather-clear-night
|
else row "Night light (off)" weather-clear-night
|
||||||
@@ -609,7 +620,7 @@ ${themeRows}
|
|||||||
row "Power profile" preferences-system-power
|
row "Power profile" preferences-system-power
|
||||||
fi
|
fi
|
||||||
back
|
back
|
||||||
} | rofi -dmenu -show-icons -p System) || exit 0
|
} | rofi -dmenu -show-icons -markup-rows -p System) || exit 0
|
||||||
case "$choice" in
|
case "$choice" in
|
||||||
"$BACK") exec "$0" ;;
|
"$BACK") exec "$0" ;;
|
||||||
*Network*) exec "$0" network ;;
|
*Network*) exec "$0" network ;;
|
||||||
@@ -633,13 +644,13 @@ ${themeRows}
|
|||||||
# short and scannable. Apps/Theme/Power/Keybindings are frequent enough
|
# short and scannable. Apps/Theme/Power/Keybindings are frequent enough
|
||||||
# to keep at the top; everything else lives under Tools or System.
|
# to keep at the top; everything else lives under Tools or System.
|
||||||
choice=$( {
|
choice=$( {
|
||||||
row "Apps" applications-all
|
row "Apps${appsHint}" applications-all
|
||||||
row "Theme" preferences-desktop-theme
|
row "Theme${menuHint "theme"}" preferences-desktop-theme
|
||||||
row "Tools" applications-utilities
|
row "Tools" applications-utilities
|
||||||
row "System" preferences-system
|
row "System" preferences-system
|
||||||
row "Power" system-shutdown
|
row "Power${menuHint "power"}" system-shutdown
|
||||||
row "Keybindings" preferences-desktop-keyboard
|
row "Keybindings${menuHint "keybinds"}" preferences-desktop-keyboard
|
||||||
} | rofi -dmenu -show-icons -p Menu) || exit 0
|
} | rofi -dmenu -show-icons -markup-rows -p Menu) || exit 0
|
||||||
case "$choice" in
|
case "$choice" in
|
||||||
*Apps*) exec rofi -show drun ;;
|
*Apps*) exec rofi -show drun ;;
|
||||||
*Theme*) exec "$0" theme ;;
|
*Theme*) exec "$0" theme ;;
|
||||||
|
|||||||
Reference in New Issue
Block a user