From c84396bda0371cb42147c82ad051bebf8a158bd5 Mon Sep 17 00:00:00 2001 From: Austin Horstman Date: Thu, 8 May 2025 10:45:00 -0500 Subject: [PATCH] rofi: modes optional (#7003) Don't include the modes option if it hasn't been used. --- modules/programs/rofi.nix | 2 +- tests/modules/programs/rofi/custom-theme-config.rasi | 1 - 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/modules/programs/rofi.nix b/modules/programs/rofi.nix index 3ff572af..705e6861 100644 --- a/modules/programs/rofi.nix +++ b/modules/programs/rofi.nix @@ -339,7 +339,6 @@ in toRasi { configuration = ( { - inherit modes; font = cfg.font; terminal = cfg.terminal; cycle = cfg.cycle; @@ -347,6 +346,7 @@ in xoffset = cfg.xoffset; yoffset = cfg.yoffset; } + // lib.optionalAttrs (modes != [ ]) { inherit modes; } // cfg.extraConfig ); # @theme must go after configuration but attrs are output in alphabetical order ('@' first) diff --git a/tests/modules/programs/rofi/custom-theme-config.rasi b/tests/modules/programs/rofi/custom-theme-config.rasi index 5abba0ba..6b4d5b8a 100644 --- a/tests/modules/programs/rofi/custom-theme-config.rasi +++ b/tests/modules/programs/rofi/custom-theme-config.rasi @@ -1,6 +1,5 @@ configuration { location: 0; -modes: [ ]; xoffset: 0; yoffset: 0; }