diff --git a/bumblebee/modules/xrandr.py b/bumblebee/modules/xrandr.py index a2ef8fd..1d25abf 100644 --- a/bumblebee/modules/xrandr.py +++ b/bumblebee/modules/xrandr.py @@ -58,12 +58,21 @@ class Module(bumblebee.engine.Module): for widget in new_widgets: widgets.append(widget) + if self._autoupdate == False: + widget = bumblebee.output.Widget(full_text="") + widget.set("state", "refresh") + self._engine.input.register_callback(widget, button=1, cmd=self._refresh) + widgets.append(widget) + def update(self, widgets): self.update_widgets(widgets) def state(self, widget): return widget.get("state", "off") + def _refresh(self, event): + self._needs_update = True + def _toggle(self, event): self._needs_update = True path = os.path.dirname(os.path.abspath(__file__)) diff --git a/themes/icons/ascii.json b/themes/icons/ascii.json index 3980e8b..f0e3621 100644 --- a/themes/icons/ascii.json +++ b/themes/icons/ascii.json @@ -77,7 +77,7 @@ "activated": {"prefix": "caf-on" }, "deactivated": { "prefix": "caf-off " } }, "xrandr": { - "on": { "prefix": " off "}, "off": { "prefix": " on "} + "on": { "prefix": " off "}, "off": { "prefix": " on "}, "refresh": { "prefix": " refresh "} }, "redshift": { "day": { "prefix": "day" }, "night": { "prefix": "night" }, "transition": { "prefix": "trans" } diff --git a/themes/icons/awesome-fonts.json b/themes/icons/awesome-fonts.json index 56746d9..c379354 100644 --- a/themes/icons/awesome-fonts.json +++ b/themes/icons/awesome-fonts.json @@ -122,7 +122,8 @@ }, "xrandr": { "on": { "prefix": " "}, - "off": { "prefix": " " } + "off": { "prefix": " " }, + "refresh": { "prefix": "" } }, "redshift": { "day": { "prefix": "" },