From 40b62124e6624028129f03ae54fdef9b94b071e5 Mon Sep 17 00:00:00 2001 From: Bernardo Magri Date: Thu, 21 May 2026 20:13:34 +0100 Subject: [PATCH] fix(scripts): correct \$NNOMARCHY_TOGGLE_* typos breaking 2 toggles MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit nomarchy-menu:330 and nomarchy-launch-screensaver:16 referenced \$NNOMARCHY_TOGGLE_SUSPEND and \$NNOMARCHY_TOGGLE_SCREENSAVER with a double-N. The real env vars injected by features/scripts/default.nix:69-73 are single-N. Both reads always resolved to the empty string, so: - nomarchy.toggles.suspend = false; still showed "Suspend" in the system menu (the condition is "!= false", so empty != false → true). - nomarchy.toggles.screensaver = false; still launched the screensaver on hypridle's 150s timeout (the gate "== false" never hit on empty, so the early-exit was skipped). Both toggles documented in docs/OPTIONS.md were vacuous in practice. --- features/scripts/utils/nomarchy-launch-screensaver | 2 +- features/scripts/utils/nomarchy-menu | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/features/scripts/utils/nomarchy-launch-screensaver b/features/scripts/utils/nomarchy-launch-screensaver index b934e1e..324b7e6 100755 --- a/features/scripts/utils/nomarchy-launch-screensaver +++ b/features/scripts/utils/nomarchy-launch-screensaver @@ -13,7 +13,7 @@ pgrep -f org.nomarchy.screensaver && exit 0 # Allow screensaver to be turned off but also force started # Skip if screensaver is disabled in configuration -if [[ $NNOMARCHY_TOGGLE_SCREENSAVER == "false" ]] && [[ $1 != "force" ]]; then +if [[ $NOMARCHY_TOGGLE_SCREENSAVER == "false" ]] && [[ $1 != "force" ]]; then exit 0 fi diff --git a/features/scripts/utils/nomarchy-menu b/features/scripts/utils/nomarchy-menu index 225e558..0dd6f72 100755 --- a/features/scripts/utils/nomarchy-menu +++ b/features/scripts/utils/nomarchy-menu @@ -327,7 +327,7 @@ show_about() { show_system_menu() { local options="󱄄 Screensaver\n Lock" - [[ $NNOMARCHY_TOGGLE_SUSPEND != "false" ]] && options="$options\n󰒲 Suspend" + [[ $NOMARCHY_TOGGLE_SUSPEND != "false" ]] && options="$options\n󰒲 Suspend" nomarchy-hibernation-available && options="$options\n󰤁 Hibernate" options="$options\n󰍃 Logout\n󰜉 Restart\n󰐥 Shutdown"