Update theme engine
Signed-off-by: Nikolaos Karaolidis <nick@karaolidis.com>
This commit is contained in:
@@ -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
|
||||
|
Reference in New Issue
Block a user