We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents 30281f6 + db2ef7b commit 22d4487Copy full SHA for 22d4487
dunst/dunst
@@ -10,7 +10,7 @@ track of the toggle.
10
__author__ = "Jessey White-Cinis <[email protected]>"
11
__copyright__ = "Copyright (c) 2019 Jessey White-Cinis"
12
__license__ = "MIT"
13
-__version__ = "1.0.0"
+__version__ = "1.1.0"
14
15
import os
16
import subprocess
@@ -39,8 +39,10 @@ def clicked():
39
40
def muted():
41
'''Returns True if Dunst is muted'''
42
- mute = "DUNST_MUTE" in os.environ and os.environ["DUNST_MUTE"]
43
- return mute == 'on'
+ cmd = ['dunstctl', 'is-paused']
+ proc = subprocess.Popen(cmd, stdout=subprocess.PIPE)
44
+ output = proc.communicate()[0]
45
+ return u'true' == output.strip().decode("UTF-8")
46
47
if clicked():
48
# toggle button click to turn mute on and off
0 commit comments