Custom packages

This commit is contained in:
Filippo Berto 2024-10-21 15:57:23 +02:00
parent 1096479c4a
commit 3286c02857
No known key found for this signature in database
GPG key ID: FE98AE5EC52B1056
8 changed files with 122 additions and 229 deletions

View file

@ -1,35 +1,32 @@
{ lib
, rice
, roboto
{ roboto
, swaylock
, writeScriptBin
, font ? {
package = roboto;
name = "Roboto";
, font ? { package = roboto; name = "Roboto"; size = 10; }
, colors ? {
base = "000000ff";
inside = { ver = "00ff00ff"; wrong = "ff0000ff"; base = "000000ff"; };
ring = { ver = "10ff10ff"; wrong = "ff1010ff"; base = "1010ffff"; };
key.hl = "ff1010ff";
bs.hl = "ff1010ff";
separator = "000000ff";
}
, wallpaper ? ../../wallpapers/n8ca4obsys991.png
, palette ? rice.palette.palette { }
, ...
}:
let
strPalette = lib.nix-rice.palette.toRgbaShortHex palette;
in
writeScriptBin "wl-lockscreen" ''
}: writeScriptBin "wl-lockscreen" ''
# Using font package ${font.package}
${swaylock}/bin/swaylock \
--color "${strPalette.primary.background}" \
--inside-ver-color "${strPalette.normal.green}" \
--inside-wrong-color "${strPalette.normal.red}" \
--inside-color "${strPalette.normal.black}" \
--ring-ver-color "${strPalette.bright.green}" \
--ring-wrong-color "${strPalette.bright.red}" \
--ring-ver-color "${strPalette.bright.green}" \
--ring-wrong-color "${strPalette.bright.red}" \
--ring-color "${strPalette.bright.blue}" \
--color "${colors.base}" \
--inside-ver-color "${colors.inside.ver}" \
--inside-wrong-color "${colors.inside.wrong}" \
--inside-color "${colors.inside.base}" \
--ring-ver-color "${colors.ring.ver}" \
--ring-wrong-color "${colors.ring.wrong}" \
--ring-ver-color "${colors.ring.ver}" \
--ring-wrong-color "${colors.ring.wrong}" \
--ring-color "${colors.ring.base}" \
--line-uses-ring \
--key-hl-color "${strPalette.bright.red}" \
--bs-hl-color "${strPalette.bright.red}" \
--separator-color "${strPalette.normal.black}" \
--key-hl-color "${colors.key.hl}" \
--bs-hl-color "${colors.bs.hl}" \
--separator-color "${colors.separator}" \
--font "${font.name}" \
--font-size "${toString font.size}" \
--image "${toString wallpaper}" \