bemenu: allow floats in settings

For example, the CLI option --width-factor controls the width of the
launcher and is set to a value between 0-1.
This commit is contained in:
Anton Tetov 2024-01-23 08:21:17 +01:00 committed by GitHub
parent 2d47379ad5
commit 3d0dc78e80
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 4 additions and 2 deletions

View file

@ -15,7 +15,7 @@ in {
package = mkPackageOption pkgs "bemenu" { };
settings = mkOption {
type = with types; attrsOf (oneOf [ str int bool ]);
type = with types; attrsOf (oneOf [ str number bool ]);
default = { };
example = literalExpression ''
{
@ -32,6 +32,7 @@ in {
hf = "#f9e2af";
af = "#cdd6f4";
ab = "#1e1e2e";
width-factor = 0.3;
}
'';
description =