Small fix to xrandr module.
This commit is contained in:
parent
b4fc88b57e
commit
edb8eaf410
1 changed files with 2 additions and 2 deletions
|
@ -85,14 +85,14 @@ class Module(core.module.Module):
|
||||||
self._needs_update = True
|
self._needs_update = True
|
||||||
|
|
||||||
def _toggle(self, event):
|
def _toggle(self, event):
|
||||||
self._refresh(self, event)
|
self._refresh(event)
|
||||||
|
|
||||||
if util.format.asbool(self.parameter("overwrite_i3config", False)) == True:
|
if util.format.asbool(self.parameter("overwrite_i3config", False)) == True:
|
||||||
toggle_cmd = utility("toggle-display.sh")
|
toggle_cmd = utility("toggle-display.sh")
|
||||||
else:
|
else:
|
||||||
toggle_cmd = "xrandr"
|
toggle_cmd = "xrandr"
|
||||||
|
|
||||||
widget = self.widget_by_id(event["instance"])
|
widget = self.widget(widget_id=event["instance"])
|
||||||
|
|
||||||
if widget.get("state") == "on":
|
if widget.get("state") == "on":
|
||||||
util.cli.execute("{} --output {} --off".format(toggle_cmd, widget.name))
|
util.cli.execute("{} --output {} --off".format(toggle_cmd, widget.name))
|
||||||
|
|
Loading…
Reference in a new issue