finalise wallpaper
This commit is contained in:
parent
ef0c9157f4
commit
eabb1371eb
12 changed files with 217 additions and 25 deletions
20
util/wallpaper.nix
Normal file
20
util/wallpaper.nix
Normal file
|
@ -0,0 +1,20 @@
|
|||
{pkgs}: {
|
||||
palette,
|
||||
wallpaper,
|
||||
}: let
|
||||
str_pal = with pkgs.lib; concatStringsSep " " (builtins.foldl' (acc: el: acc ++ (attrValues el)) [] [palette.normal palette.bright palette.util]);
|
||||
in
|
||||
pkgs.stdenv.mkDerivation rec {
|
||||
name = "generated-wallpaper.png";
|
||||
src = wallpaper;
|
||||
buildInputs = [
|
||||
pkgs.lutgen
|
||||
];
|
||||
|
||||
phases = ["installPhase"];
|
||||
|
||||
installPhase = ''
|
||||
echo -e "Generating wallpaper from ${wallpaper} using palette:\n${str_pal}.."
|
||||
${pkgs.lib.getExe pkgs.lutgen} apply --lum 0.8 -l 10 -s 128 -n 8 -o $out ${wallpaper} -- ${str_pal}
|
||||
'';
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue