mirror of
https://github.com/Noratrieb/nixos.git
synced 2026-01-14 11:45:06 +01:00
9 lines
413 B
Nix
9 lines
413 B
Nix
{ pkgs, lib }: pkgs.writeShellApplication {
|
|
name = "regenerate-bsod-lockscreen";
|
|
text = ''
|
|
echo "Regenerating the lock screen..."
|
|
stopcode=$(shuf -n 1 < "${./codes.txt}")
|
|
percent=$(shuf -i 0-101 -n1)
|
|
${lib.getExe pkgs.typst} compile --input "stopcode=$stopcode" --input "percent=$percent" --font-path ${./fonts} ${./bsod.typ} --format png --ppi 200 "/run/user/$(id -u)/lockscreen.png"
|
|
'';
|
|
}
|