hm/swww: update symlink when swww-daemon is not active

This commit is contained in:
Lu Wang 2024-12-08 17:45:32 +08:00
parent aff0796cd3
commit a4549f7052
Signed by: rebmit
SSH key fingerprint: SHA256:3px8QV1zEerIrEWHaqtH5rR9kjetyRST5EipOPrd+bU
2 changed files with 1 additions and 3 deletions

View file

@ -2,7 +2,5 @@
{ {
home.globalPersistence.directories = [ home.globalPersistence.directories = [
"Projects" "Projects"
".local/share/uv"
]; ];
} }

View file

@ -38,11 +38,11 @@ in
pkgs.writeShellApplication { pkgs.writeShellApplication {
name = "darkman-switch-swww-${mode}"; name = "darkman-switch-swww-${mode}";
text = '' text = ''
ln --force --symbolic --verbose "${config.theme.${mode}.wallpaper}" "$HOME/.config/swww/wallpaper"
if ! ${config.systemd.user.systemctlPath} --user is-active swww-daemon; then if ! ${config.systemd.user.systemctlPath} --user is-active swww-daemon; then
echo "swww-daemon is not active" echo "swww-daemon is not active"
exit 1 exit 1
fi fi
ln --force --symbolic --verbose "${config.theme.${mode}.wallpaper}" "$HOME/.config/swww/wallpaper"
${swww}/bin/swww img ~/.config/swww/wallpaper ${swww}/bin/swww img ~/.config/swww/wallpaper
''; '';
}; };