[core] Add debugging capabilities
* If an exception is thrown, catch it and show a (somewhat) nice error message in the i3bar instead of the normal content * Add a flag "-d" for debugging into a debug log. Currently, this only logs commandline calls as they occur and their return values, as well as exceptions. fixes #58
This commit is contained in:
parent
11235d6883
commit
251f8d2e9f
5 changed files with 80 additions and 9 deletions
|
@ -50,9 +50,14 @@ class I3BarOutput(object):
|
|||
def __init__(self, theme):
|
||||
self._theme = theme
|
||||
self._widgets = []
|
||||
self._started = False
|
||||
|
||||
def started(self):
|
||||
return self._started
|
||||
|
||||
def start(self):
|
||||
"""Print start preamble for i3bar protocol"""
|
||||
self._started = True
|
||||
sys.stdout.write(json.dumps({"version": 1, "click_events": True}) + "[\n")
|
||||
|
||||
def stop(self):
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue