From 78055b386876af4d04eac6b9bc835af479c7b477 Mon Sep 17 00:00:00 2001 From: Daniel Thwaites Date: Fri, 7 Oct 2022 06:57:54 +0100 Subject: [PATCH] Use white text when the black background is enabled :wheelchair: The theme's text colour may not contrast well with black, especially for themes which expect a light coloured background. --- modules/plymouth/default.nix | 20 +++++++++++++------- 1 file changed, 13 insertions(+), 7 deletions(-) diff --git a/modules/plymouth/default.nix b/modules/plymouth/default.nix index ee672b1..e7ce68e 100644 --- a/modules/plymouth/default.nix +++ b/modules/plymouth/default.nix @@ -18,13 +18,19 @@ let cp ${config.lib.stylix.pixel "base01"} $themeDir/progress-bar.png cp ${./theme.script} $themeDir/stylix.script - substituteInPlace $themeDir/stylix.script \ - --replace "%BASE00%" "${ - if config.stylix.targets.plymouth.blackBackground - then "0, 0, 0" - else "${base00-dec-r}, ${base00-dec-g}, ${base00-dec-b}" - }" \ - --replace "%BASE05%" "${base05-dec-r}, ${base05-dec-g}, ${base05-dec-b}" + ${ + if config.stylix.targets.plymouth.blackBackground + then '' + substituteInPlace $themeDir/stylix.script \ + --replace "%BASE00%" "0, 0, 0" \ + --replace "%BASE05%" "1, 1, 1" + '' + else '' + substituteInPlace $themeDir/stylix.script \ + --replace "%BASE00%" "${base00-dec-r}, ${base00-dec-g}, ${base00-dec-b}" \ + --replace "%BASE05%" "${base05-dec-r}, ${base05-dec-g}, ${base05-dec-b}" + '' + } echo " [Plymouth Theme]