From f9ce7c5234ec246b7b0a2d8cd6b54c1dd64cc33d Mon Sep 17 00:00:00 2001 From: Austin Horstman Date: Thu, 8 Jan 2026 10:07:34 -0600 Subject: [PATCH] bemenu: migrate to lib.cli.toCommandLineShellGNU Migrates from the deprecated toCommandLineShell to toCommandLineShellGNU. This changes the output format to use GNU-style concatenated options (--line-height=28) and adds shell escaping for values with special characters (e.g., '#1e1e2e' becomes '--ab=#1e1e2e'). The format was verified to work correctly with bemenu. Signed-off-by: Austin Horstman --- modules/programs/bemenu.nix | 2 +- tests/modules/programs/bemenu/basic-configuration.nix | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/modules/programs/bemenu.nix b/modules/programs/bemenu.nix index dcbf2e5b8..673b2045e 100644 --- a/modules/programs/bemenu.nix +++ b/modules/programs/bemenu.nix @@ -54,7 +54,7 @@ in home.packages = lib.mkIf (cfg.package != null) [ cfg.package ]; home.sessionVariables = lib.mkIf (cfg.settings != { }) { - BEMENU_OPTS = lib.cli.toGNUCommandLineShell { } cfg.settings; + BEMENU_OPTS = lib.cli.toCommandLineShellGNU { } cfg.settings; }; }; } diff --git a/tests/modules/programs/bemenu/basic-configuration.nix b/tests/modules/programs/bemenu/basic-configuration.nix index cf556ef6a..3549d1d9e 100644 --- a/tests/modules/programs/bemenu/basic-configuration.nix +++ b/tests/modules/programs/bemenu/basic-configuration.nix @@ -22,6 +22,6 @@ nmt.script = '' assertFileExists home-path/etc/profile.d/hm-session-vars.sh assertFileContains home-path/etc/profile.d/hm-session-vars.sh \ - "export BEMENU_OPTS=\"--ab '#1e1e2e' --af '#cdd6f4' --fb '#1e1e2e' --ff '#cdd6f4' --hb '#1e1e2e' --hf '#f9e2af' --ignorecase --line-height 28 --nb '#1e1e2e' --nf '#cdd6f4' --prompt open --tb '#1e1e2e' --tf '#f38ba8' --width-factor 0.300000\"" + "export BEMENU_OPTS=\"'--ab=#1e1e2e' '--af=#cdd6f4' '--fb=#1e1e2e' '--ff=#cdd6f4' '--hb=#1e1e2e' '--hf=#f9e2af' --ignorecase '--line-height=28' '--nb=#1e1e2e' '--nf=#cdd6f4' '--prompt=open' '--tb=#1e1e2e' '--tf=#f38ba8' '--width-factor=0.300000'\"" ''; }