Add support for switching dpms

This commit is contained in:
mw 2019-06-19 22:26:48 +02:00
parent 4db9c714bb
commit 7b08777d77

View file

@ -39,9 +39,11 @@ class Module(bumblebee.engine.Module):
def _toggle(self, widget): def _toggle(self, widget):
if self._active(): if self._active():
bumblebee.util.execute("xset +dpms")
bumblebee.util.execute("xset s default") bumblebee.util.execute("xset s default")
bumblebee.util.execute("notify-send \"Out of coffee\"") bumblebee.util.execute("notify-send \"Out of coffee\"")
else: else:
bumblebee.util.execute("xset -dpms")
bumblebee.util.execute("xset s off") bumblebee.util.execute("xset s off")
bumblebee.util.execute("notify-send \"Consuming caffeine\"") bumblebee.util.execute("notify-send \"Consuming caffeine\"")