1
0
Fork 0
mirror of https://github.com/nix-community/home-manager synced 2024-11-23 11:39:46 +01:00

kitty: allow float values in settings (#5925)

Some settings in kitty allow floating-point values, but this was not
reflected in the type.
This commit is contained in:
MithicSpirit 2024-10-07 06:18:19 -04:00 committed by GitHub
parent bc623830e6
commit fcf5e608ac
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
3 changed files with 4 additions and 2 deletions

View file

@ -5,7 +5,7 @@ with lib;
let let
cfg = config.programs.kitty; cfg = config.programs.kitty;
eitherStrBoolInt = with types; either str (either bool int); settingsValueType = with types; oneOf [ str bool int float ];
optionalPackage = opt: optionalPackage = opt:
optional (opt != null && opt.package != null) opt.package; optional (opt != null && opt.package != null) opt.package;
@ -102,7 +102,7 @@ in {
}; };
settings = mkOption { settings = mkOption {
type = types.attrsOf eitherStrBoolInt; type = types.attrsOf settingsValueType;
default = { }; default = { };
example = literalExpression '' example = literalExpression ''
{ {

View file

@ -7,6 +7,7 @@ font_size 8
# Shell integration is sourced and configured manually # Shell integration is sourced and configured manually
shell_integration no-rc shell_integration no-rc
background_opacity 0.500000
enable_audio_bell no enable_audio_bell no
scrollback_lines 10000 scrollback_lines 10000
update_check_interval 0 update_check_interval 0

View file

@ -17,6 +17,7 @@ with lib;
scrollback_lines = 10000; scrollback_lines = 10000;
enable_audio_bell = false; enable_audio_bell = false;
update_check_interval = 0; update_check_interval = 0;
background_opacity = 0.5;
}; };
font.name = "DejaVu Sans"; font.name = "DejaVu Sans";