fix ui
This commit is contained in:
@@ -4,6 +4,12 @@ let
|
||||
colors = config.colorScheme.palette;
|
||||
mediaImages = config.syscfg.media.main;
|
||||
mediaNames = map (image: builtins.baseNameOf (toString image)) mediaImages;
|
||||
mediaSourceDir = pkgs.linkFarm "wallpaper-media" (
|
||||
map (image: {
|
||||
name = builtins.baseNameOf (toString image);
|
||||
path = image;
|
||||
}) mediaImages
|
||||
);
|
||||
|
||||
dither = "atkinson"; # none | floyd-steinberg | atkinson | jjn | burkes | sierra | sierra-lite
|
||||
paletteSize = 0;
|
||||
@@ -99,10 +105,9 @@ let
|
||||
);
|
||||
|
||||
buildCommands =
|
||||
lib.concatMapStringsSep "\n" (image:
|
||||
lib.concatMapStringsSep "\n" (name:
|
||||
let
|
||||
source = toString image;
|
||||
name = builtins.baseNameOf source;
|
||||
source = "${mediaSourceDir}/${name}";
|
||||
target = "build/${name}";
|
||||
in
|
||||
if lib.hasSuffix ".gif" (lib.toLower name) then ''
|
||||
@@ -110,7 +115,7 @@ let
|
||||
'' else ''
|
||||
repalette ${lib.escapeShellArg source} ${lib.escapeShellArg target} -p ${lib.escapeShellArg paletteHex} --dither ${lib.escapeShellArg dither}
|
||||
''
|
||||
) mediaImages;
|
||||
) mediaNames;
|
||||
in
|
||||
assert lib.assertMsg
|
||||
(builtins.length mediaNames == builtins.length (lib.unique mediaNames))
|
||||
|
||||
Reference in New Issue
Block a user