Small fix to xrandr module.

This commit is contained in:
Andrew Reisner 2020-07-05 12:35:44 -06:00
parent b4fc88b57e
commit edb8eaf410
No known key found for this signature in database
GPG key ID: 24A156D9206E5593

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))