[modules/dunst] Fix toggling

At least Void Linux doesn't like kill -SIGUSR<N>

Also, added some debugging to inspect state changes for modules/widgets.

Also also, fix problem with min width, if no minwidth is set
This commit is contained in:
tobi-wan-kenobi 2020-03-29 14:13:21 +02:00
parent da14ad3f36
commit b66b13211e
3 changed files with 15 additions and 5 deletions

View file

@ -50,6 +50,7 @@ class i3(object):
return '{}{}{}'.format(padding, full_text, padding)
def __decorate(self, module, widget, full_text):
if full_text is None: return None
return '{}{}{}'.format(
self.__pad(module, widget, self._theme.prefix(widget)),
full_text,
@ -88,6 +89,10 @@ class i3(object):
'background': self._theme.bg(widget),
'min_width': self.__decorate(module, widget, widget.get('theme.minwidth')),
})
if (self._config.debug()):
attr.update({
'__state': ", ".join(module.state(widget))
})
return [attr]
def widgets(self, module):