danth / stylix

System-wide colorscheming and typography for NixOS
https://stylix.danth.me/
MIT License
1.19k stars 145 forks source link

kscreenlocker not updating #537

Open kr-nn opened 2 months ago

kr-nn commented 2 months ago

I noticed that kscreenlocker does not update even past reboots/logouts. I have to manually update my kscreenlocker wallpaper for it to update.

kr-nn commented 2 months ago

I find this simple function is enough to update kscreenlocker:

genTheme = wallpaper: { # wallpaper is a wallpaper pkg (path or pkgs.fetchurl) can likely be inherited from stylix.image
  home.file.".config/kscreenlockerrc".text = ''
    [Greeter]
    Wallpaper=org.kde.image
    WallpaperPlugin=org.kde.image
    Image=file://${wallpaper}
  '';
};
trueNAHO commented 2 months ago

Feel free to submit a PR.

danth commented 2 months ago

The wallpaper is changed by running plasma-apply-wallpaperimage here - I would expect that to do the same thing as changing the wallpaper through the settings menu.

If not, then including kscreenlockerrc in configPackage should be enough to fix this, although I think that would still require logging out and back in for it to be applied. Note that makeImmutable is required for the settings there to override what you have in your home directory.