feature(lib for bgs) adding a library for backgrounds
This commit is contained in:
19
lib/theme/bgs.nix
Normal file
19
lib/theme/bgs.nix
Normal 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
3
lib/theme/default.nix
Normal file
@@ -0,0 +1,3 @@
|
||||
lib: {
|
||||
inherit ((import ./bgs.nix lib)) bgs;
|
||||
}
|
||||
Reference in New Issue
Block a user