Merge pull request #677 from andrewreisner/main

Small fix to xrandr module.
This commit is contained in:
tobi-wan-kenobi 2020-07-06 07:00:52 +02:00 committed by GitHub
commit 6b63b87c42
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -85,14 +85,14 @@ class Module(core.module.Module):
self._needs_update = True
def _toggle(self, event):
self._refresh(self, event)
self._refresh(event)
if util.format.asbool(self.parameter("overwrite_i3config", False)) == True:
toggle_cmd = utility("toggle-display.sh")
else:
toggle_cmd = "xrandr"
widget = self.widget_by_id(event["instance"])
widget = self.widget(widget_id=event["instance"])
if widget.get("state") == "on":
util.cli.execute("{} --output {} --off".format(toggle_cmd, widget.name))