diff options
| author | Ultrabug <ultrabug@gentoo.org> | 2014-11-23 20:55:53 +0100 |
|---|---|---|
| committer | Ultrabug <ultrabug@gentoo.org> | 2014-11-23 20:55:53 +0100 |
| commit | d9747b64e1e62abee12ef0bafd365cf380ff7fe9 (patch) | |
| tree | 11a1d156c38ec96b83b4a1780719fc856cbbebad /py3status/modules/empty_class.py | |
| parent | 62b2bd2251997bf8608e9620d91f688585221040 (diff) | |
move modules folder so we can install it as a module of py3status
Diffstat (limited to 'py3status/modules/empty_class.py')
| -rw-r--r-- | py3status/modules/empty_class.py | 41 |
1 files changed, 41 insertions, 0 deletions
diff --git a/py3status/modules/empty_class.py b/py3status/modules/empty_class.py new file mode 100644 index 0000000..077269c --- /dev/null +++ b/py3status/modules/empty_class.py @@ -0,0 +1,41 @@ +class Py3status: + """ + Empty and basic py3status class. + + NOTE: py3status will NOT execute: + - methods starting with '_' + - methods decorated by @property and @staticmethod + + NOTE: reserved method names: + - 'kill' method for py3status exit notification + - 'on_click' method for click events from i3bar + """ + def kill(self, i3status_output_json, i3status_config): + """ + This method will be called upon py3status exit. + """ + pass + + def on_click(self, i3status_output_json, i3status_config, event): + """ + This method will be called when a click event occurs on this module's + output on the i3bar. + + Example 'event' json object: + {'y': 13, 'x': 1737, 'button': 1, 'name': 'empty', 'instance': 'first'} + """ + pass + + def empty(self, i3status_output_json, i3status_config): + """ + This method will return an empty text message + so it will NOT be displayed on your i3bar. + + If you want something displayed you should write something + in the 'full_text' key of your response. + + See the i3bar protocol spec for more information: + http://i3wm.org/docs/i3bar-protocol.html + """ + response = {'full_text': '', 'name': 'empty', 'instance': 'first'} + return (0, response) |
