feat(menu): Look & Feel category — theme, wallpaper, night light (item 19)
All checks were successful
Check / eval (push) Successful in 3m3s
All checks were successful
Check / eval (push) Successful in 3m3s
The gate was >=3 appearance entries and it's met: the root's Theme row becomes "Look & Feel" (pango-escaped & — the root passes -markup-rows; matched on *Look*), a new lookfeel submenu carries the Theme grid (SUPER+T hint), Next wallpaper (SUPER+SHIFT+T hint via the new generalized hintForAction, which menuHint is now sugar over), and the Night light toggle moved out of System — which thins by one row. The root stays at six entries; both direct binds still hit the leaves. Verified: V0; V1 — rendered menu passes bash -n with the mode, escaped label and relocated night-light row; visual — tokyo-night 1080p capture renders "Look & Feel" correctly with hints intact. Submenu flow queued for a session test (HARDWARE-QUEUE). Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This commit is contained in:
@@ -138,11 +138,12 @@ let
|
||||
# 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;
|
||||
# Empty (no hint) when nothing binds the action.
|
||||
hintForAction = action:
|
||||
let m = lib.filter (b: b.action == action) keybinds.binds;
|
||||
in lib.optionalString (m != [ ])
|
||||
" <span size='small' alpha='55%'>${prettyKeys (lib.head m)}</span>";
|
||||
menuHint = module: hintForAction "exec, nomarchy-menu ${module}";
|
||||
# Apps opens rofi drun directly, not a nomarchy-menu module.
|
||||
appsHint = " <span size='small' alpha='55%'>SUPER + D</span>";
|
||||
|
||||
@@ -398,6 +399,26 @@ ${themeRows}
|
||||
*"Record screen"*) exec nomarchy-record start screen ;;
|
||||
esac ;;
|
||||
|
||||
lookfeel)
|
||||
# Look & Feel — appearance grouped (item 19): the theme picker,
|
||||
# wallpaper cycling, night light. The root stays six rows; the
|
||||
# SUPER+T / SUPER+SHIFT+T direct binds still hit the leaves.
|
||||
choice=$( {
|
||||
row "Theme${menuHint "theme"}" preferences-desktop-theme
|
||||
row "Next wallpaper${hintForAction "exec, nomarchy-theme-sync bg next"}" preferences-desktop-wallpaper
|
||||
if systemctl --user is-active --quiet hyprsunset.service 2>/dev/null
|
||||
then row "Night light (on)" weather-clear-night
|
||||
else row "Night light (off)" weather-clear-night
|
||||
fi
|
||||
back
|
||||
} | rofi -dmenu -show-icons -markup-rows -p "Look & Feel") || exit 0
|
||||
case "$choice" in
|
||||
"$BACK") exec "$0" ;;
|
||||
*Theme*) exec "$0" theme ;;
|
||||
*wallpaper*) exec nomarchy-theme-sync bg next ;;
|
||||
*"Night light"*) exec "$0" nightlight ;;
|
||||
esac ;;
|
||||
|
||||
display-profile)
|
||||
# Named multi-output layouts (nomarchy.displayProfiles). Applying is
|
||||
# instant (hyprctl per entry, via nomarchy-display-profile) and
|
||||
@@ -605,10 +626,6 @@ ${themeRows}
|
||||
row "Display" video-display
|
||||
command -v system-config-printer >/dev/null 2>&1 && row "Printers" printer
|
||||
row "Do Not Disturb${menuHint "dnd"}" notification-disabled
|
||||
if systemctl --user is-active --quiet hyprsunset.service 2>/dev/null
|
||||
then row "Night light (on)" weather-clear-night
|
||||
else row "Night light (off)" weather-clear-night
|
||||
fi
|
||||
if [ "$(nomarchy-theme-sync get settings.autoTimezone 2>/dev/null)" = true ]
|
||||
then row "Auto timezone (on)" preferences-system-time
|
||||
else row "Auto timezone (off)" preferences-system-time
|
||||
@@ -636,7 +653,6 @@ ${themeRows}
|
||||
*Display*) exec "$0" display ;;
|
||||
*Printers*) exec "$0" printers ;;
|
||||
*"Do Not Disturb"*) exec "$0" dnd ;;
|
||||
*"Night light"*) exec "$0" nightlight ;;
|
||||
*"Auto timezone"*) exec "$0" autotimezone ;;
|
||||
*"Auto-commit"*) exec "$0" autocommit ;;
|
||||
*Snapshots*) exec "$0" snapshot ;;
|
||||
@@ -651,7 +667,7 @@ ${themeRows}
|
||||
# to keep at the top; everything else lives under Tools or System.
|
||||
choice=$( {
|
||||
row "Apps${appsHint}" applications-all
|
||||
row "Theme${menuHint "theme"}" preferences-desktop-theme
|
||||
row "Look & Feel" preferences-desktop-theme
|
||||
row "Tools" applications-utilities
|
||||
row "System" preferences-system
|
||||
row "Power${menuHint "power"}" system-shutdown
|
||||
@@ -659,7 +675,7 @@ ${themeRows}
|
||||
} | rofi -dmenu -show-icons -markup-rows -p Menu) || exit 0
|
||||
case "$choice" in
|
||||
*Apps*) exec rofi -show drun ;;
|
||||
*Theme*) exec "$0" theme ;;
|
||||
*Look*) exec "$0" lookfeel ;;
|
||||
*Tools*) exec "$0" tools ;;
|
||||
*System*) exec "$0" system ;;
|
||||
*Power*) exec "$0" power ;;
|
||||
@@ -667,7 +683,7 @@ ${themeRows}
|
||||
esac ;;
|
||||
|
||||
*)
|
||||
echo "usage: nomarchy-menu [tools|system|power|power-profile|theme|clipboard|calc|files|emoji|web|network|bluetooth|audio|display|display-profile|printers|capture|colorpicker|keybinds|ask|dnd|nightlight|autotimezone|autocommit|vpn|snapshot]" >&2
|
||||
echo "usage: nomarchy-menu [lookfeel|tools|system|power|power-profile|theme|clipboard|calc|files|emoji|web|network|bluetooth|audio|display|display-profile|printers|capture|colorpicker|keybinds|ask|dnd|nightlight|autotimezone|autocommit|vpn|snapshot]" >&2
|
||||
exit 64 ;;
|
||||
esac
|
||||
'';
|
||||
|
||||
Reference in New Issue
Block a user