I use KDE Plasma as DE, and I can set presentation mode (to prevent sleeping) in settings, I would like to ask you if I can set it in terminal, because I would like to create script for it.
# To set presentation mode
inhibit_cookie=$(qdbus org.freedesktop.PowerManagement.Inhibit /org/freedesktop/PowerManagement/Inhibit org.freedesktop.PowerManagement.Inhibit.Inhibit "a name" "a reason")
# To unset presentation mode
qdbus org.freedesktop.PowerManagement.Inhibit /org/freedesktop/PowerManagement/Inhibit org.freedesktop.PowerManagement.Inhibit.UnInhibit $inhibit_cookie
1 Answers