I've been looking for a command line way to switch KDE5 power management to suspend or to hibernate, so I can have a script which will, when I wake the computer, set the next sleep according to whether it's day or night, i.e. after 11pm, hibernate at next sleep, after 8am suspend at next sleep.

Can anyone point me to the right bit of documentation / dbus commands / whatever?


p.s. I've searched, and there's lots of old stuff that no longer works, but nothing recent I can see ...