fix(theme/hyprpaper): complete rewrite

This commit is contained in:
2025-08-31 15:38:10 +02:00
parent e70a2de159
commit f22f925b83
2 changed files with 44 additions and 55 deletions

View File

@@ -1,34 +1,28 @@
{ lib, ... }:
let
inherit (lib) mkOption types;
bgs = {
wallpaper_1 = "~/media/images/bg_1.jpg";
wallpaper_2 = "~/media/images/bg_2.jpg";
wallpaper_3 = "~/media/images/bg_3.jpg";
wallpaper_4 = "~/media/images/waterwindow.jpg";
wallpaper_5 = "~/media/images/barngreet.png";
};
bgList = builtins.attrNames bgs;
bgList = [
"wallpaper_1"
"wallpaper_2"
"wallpaper_3"
"wallpaper_4"
"wallpaper_5"
];
in
{
options.settings.theme = {
background = {
lockscreen = mkOption {
type = types.enum bgList;
apply = name: bgs.${name};
example = "wallpaper_1";
};
primary = mkOption {
type = types.enum bgList;
apply = name: bgs.${name};
example = "wallpaper_2";
};
secondary = mkOption {
type = types.nullOr (types.enum bgList);
default = null;
apply = name: if name == null then null else bgs.${name};
example = "wallpaper_3";
};
options.settings.theme.background = {
lockscreen = mkOption {
type = types.enum bgList;
example = "wallpaper_1";
};
primary = mkOption {
type = types.enum bgList;
example = "wallpaper_2";
};
secondary = mkOption {
type = types.nullOr (types.enum bgList);
default = null;
example = "wallpaper_3";
};
};
}