I use wlsunset with sway and waybar and want to make custom module that controls wlsunset (at least to switch it on and off) using dbus. What do you think? Can I try to submit patches like this or you would like to keep it as simple as you can?
While I would like to keep wlsunset as simple as possible (that is the primary differentiator from wlsunset), but I would not be opposed to some sort of simple wlsunsetctl for necessary dynamic use-cases. Not sure how that should be implemented though. Simple custom IPC or varlink perhaps? My main gripe with dbus is that the only semi-sensible client implementation for C is - rather ironically - sd_bus from systemd, and while we did extract it in basu, it's still not great. As a short-term solution for simple switching it on or off I usually just recommend killing and starting it as needed. The waybar module could be the one starting the process if that simplifies things, although start needs to be quick to avoid glitches.