feature(lib for bgs) adding a library for backgrounds

This commit is contained in:
2025-09-06 11:36:42 +02:00
parent 9bbb6b0b2e
commit a11e4961e1
11 changed files with 138 additions and 109 deletions

19
lib/theme/bgs.nix Normal file
View File

@@ -0,0 +1,19 @@
lib: {
bgs = rec {
files = {
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";
};
list = builtins.attrNames files;
resolve = name: if name == null then null else files.${name};
resolveList = names: builtins.filter (x: x != null) (map resolve names);
all = builtins.attrValues files;
};
}

3
lib/theme/default.nix Normal file
View File

@@ -0,0 +1,3 @@
lib: {
inherit ((import ./bgs.nix lib)) bgs;
}