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.
This commit is contained in:
Mirza Arnaut
2025-10-16 16:30:55 +02:00
committed by Austin Horstman
parent c23379a330
commit 740134d4af
2 changed files with 2 additions and 10 deletions

View File

@@ -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);

View File

@@ -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"}}}