feat: "Set as Background" for KDE
First time contributor here! MR inspired from #158 but for KDE.
Proposed Solution:
In KDE, we need to use D-Bus with JS code to update wallpaper for desktops. I noticed this technique is being used in several projects.
Please note that, I tried g_dbus
APIs for this but although the request went through, the wallpaper wasn't being updated for unknown reasons.
Hence, I resorted to g_spawn_command_line_async
+ dbus-send
.
Quirks:
I have hidden "Undo" and "Preferences" buttons from Info bar after setting the wallpaper in KDE for the following reasons:
-
Unable to trigger Undo action after setting wallpaper because we can't read
old_style
from Plasma programatically. Please find reference here from KDE Contributor's comment here -
Couldn't find a way to show Wallpaper Settings from terminal. Hence, Preferences button had to go for KDE.
I don't know C at all and my GTK skills are equally bad.