spaceapi: prevent button refresh
@@ -81,6 +81,7 @@ class Py3status:
}
def post_config_hook(self):
+ self.button_refresh = 2
self.color_open = self.py3.COLOR_OPEN or self.py3.COLOR_GOOD
self.color_closed = self.py3.COLOR_CLOSED or self.py3.COLOR_BAD
@@ -108,6 +109,7 @@ class Py3status:
self.format, {'state': state, 'lastchanged': lastchanged})
except:
full_text = STRING_UNAVAILABLE
+
return {
'cached_until': self.py3.time_in(self.cache_timeout),
'full_text': full_text,
@@ -119,6 +121,8 @@ class Py3status:
if self._url and self.button_url == button:
self.py3.command_run('xdg-open {}'.format(self._url))
self.py3.prevent_refresh()
+ elif button != self.button_refresh:
+ self.py3.prevent_refresh()
if __name__ == "__main__":
