Update theme engine

Signed-off-by: Nikolaos Karaolidis <nick@karaolidis.com>
This commit is contained in:
2025-05-20 09:07:45 +01:00
parent 2f47f70d0b
commit 1c554f1700
16 changed files with 81 additions and 102 deletions

View File

@@ -11,6 +11,7 @@
}:
let
hmConfig = config.home-manager.users.${user};
themeSwww = lib.meta.getExe (
pkgs.writeShellApplication {
name = "theme-swww";
@@ -18,7 +19,13 @@ let
coreutils
swww
];
text = "exec swww img \"${hmConfig.theme.configDir}/wallpaper\"";
text = ''
if [[ -L "${hmConfig.theme.configDir}"/wallpaper ]]; then
exec swww img "${hmConfig.theme.configDir}"/wallpaper
elif [[ -f "${hmConfig.theme.configDir}"/color ]]; then
exec swww clear "$(<"${hmConfig.theme.configDir}"/color)"
fi
'';
}
);
in