nix-community / plasma-manager

Manage KDE Plasma with Home Manager
https://nix-community.github.io/plasma-manager/
MIT License
645 stars 74 forks source link

Wallpaper Slideshow Option #130

Closed DarkKronicle closed 6 months ago

DarkKronicle commented 6 months ago

I'm wondering if it would be possible to allow for specifying slideshow options as the wallpaper.

Looking into the scripting API it doesn't look too difficult. Here's a sample (that I've tested) to set all desktops to the same configuration:

let allDesktops = desktops();
for (var desktopIndex = 0; desktopIndex < allDesktops.length; desktopIndex++) {
    var desktop = allDesktops[desktopIndex];
    desktop.wallpaperPlugin = "org.kde.slideshow";
    desktop.currentConfigGroup = Array("Wallpaper", "org.kde.slideshow", "General");
    desktop.writeConfig("SlidePaths", "/path/to/wallpapers/folder");
    desktop.writeConfig("SlideInterval", "3600"); // Seconds
}
magnouvean commented 6 months ago

A.t.m. the functionality isn't there in plasma-manager, but we will soon extend plasma-scripting support to other use-cases than just panels. We probably can introduce a higher-level module for wallpaper slideshows as well. Thanks for sharing the code for this.

magnouvean commented 6 months ago

Closing as this has now been implemented :)

DarkKronicle commented 6 months ago

Awesome, thanks!

I just learned that you can also declare multiple paths for the slideshow by concatenating them with ,'s. So it may be worthwhile to add this functionality into the module.

So for example: SlidePaths=/home/darkkronicle/Pictures/wallpapers,/run/current-system/sw/share/wallpapers would be valid.

magnouvean commented 6 months ago

This is now added as well :)