feat: add disabled
parameter
it pauses dunst notification on startup
This commit is contained in:
parent
9170785ed5
commit
9251217bb3
1 changed files with 2 additions and 0 deletions
|
@ -28,6 +28,8 @@ class Module(core.module.Module):
|
||||||
self.__states = {"unknown": ["unknown", "critical"],
|
self.__states = {"unknown": ["unknown", "critical"],
|
||||||
"true": ["muted", "warning"],
|
"true": ["muted", "warning"],
|
||||||
"false": ["unmuted"]}
|
"false": ["unmuted"]}
|
||||||
|
if util.format.asbool(self.parameter("disabled", False)):
|
||||||
|
util.cli.execute("dunstctl set-paused true", ignore_errors=True)
|
||||||
|
|
||||||
def toggle_state(self, event):
|
def toggle_state(self, event):
|
||||||
util.cli.execute("dunstctl set-paused toggle", ignore_errors=True)
|
util.cli.execute("dunstctl set-paused toggle", ignore_errors=True)
|
||||||
|
|
Loading…
Reference in a new issue