[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

@ -13,7 +13,7 @@ class Module(core.module.Module):
super().__init__(config, core.widget.Widget(''))
self._paused = False
# Make sure that dunst is currently not paused
util.cli.execute('killall -SIGUSR2 dunst', ignore_errors=True)
util.cli.execute('killall -s SIGUSR2 dunst', ignore_errors=True)
core.input.register(self, button=core.input.LEFT_MOUSE,
cmd=self.toggle_status
)
@ -23,9 +23,9 @@ class Module(core.module.Module):
try:
if self._paused:
util.cli.execute('killall -SIGUSR1 dunst')
util.cli.execute('killall -s SIGUSR1 dunst')
else:
util.cli.execute('killall -SIGUSR2 dunst')
util.cli.execute('killall -s SIGUSR2 dunst')
except:
self._paused = not self._paused # toggling failed