From 740134d4aff8b63714dcf55272ff79ad86d90685 Mon Sep 17 00:00:00 2001 From: Mirza Arnaut Date: Thu, 16 Oct 2025 16:30:55 +0200 Subject: [PATCH] vivid: replace theme content from yaml with json This should fix missinterpretation of hex colors (which should be a string) as numbers in scientific notation. For example: 1e2030. --- modules/programs/vivid.nix | 2 +- tests/modules/programs/vivid/themes/tiny.yml | 10 +--------- 2 files changed, 2 insertions(+), 10 deletions(-) diff --git a/modules/programs/vivid.nix b/modules/programs/vivid.nix index 7becdfa5e..45738b91f 100644 --- a/modules/programs/vivid.nix +++ b/modules/programs/vivid.nix @@ -138,7 +138,7 @@ in // (lib.mapAttrs' ( name: value: lib.nameValuePair "vivid/themes/${name}.yml" { - source = if lib.isAttrs value then yamlFormat.generate "${name}.yml" value else value; + source = if lib.isAttrs value then pkgs.writeText "${name}.json" (builtins.toJSON value) else value; } ) cfg.themes); diff --git a/tests/modules/programs/vivid/themes/tiny.yml b/tests/modules/programs/vivid/themes/tiny.yml index c8d435fcb..e6e4db837 100644 --- a/tests/modules/programs/vivid/themes/tiny.yml +++ b/tests/modules/programs/vivid/themes/tiny.yml @@ -1,9 +1 @@ -colors: - primary: 00aaff - secondary: ff00aa -core: - directory: - foreground: primary - executable-file: - font-style: bold - foreground: secondary +{"colors":{"primary":"00aaff","secondary":"ff00aa"},"core":{"directory":{"foreground":"primary"},"executable-file":{"font-style":"bold","foreground":"secondary"}}} \ No newline at end of file