1
0
mirror of https://github.com/osmarks/random-stuff synced 2025-09-13 07:46:00 +00:00

misc changes, cool demo

This commit is contained in:
2023-12-01 15:48:21 +00:00
parent 943e8e95b1
commit 1ee57eeda3
4 changed files with 138 additions and 3 deletions

4
ptt.py
View File

@@ -50,7 +50,7 @@ def mute():
if not muted:
muted = True
print("muted")
subprocess.run(["pacmd", "set-source-mute", source, "1"])
subprocess.run(["pactl", "set-source-mute", source, "1"])
# this could call set_icon on the taskbar icon object directly, but that seems to inconsistently cause mysterious crashes in cairo
wx.PostEvent(app.taskbar_icon, MuteSetEvent(muted=muted))
def unmute():
@@ -58,7 +58,7 @@ def unmute():
if muted:
muted = False
print("unmuted")
subprocess.run(["pacmd", "set-source-mute", source, "0"])
subprocess.run(["pactl", "set-source-mute", source, "0"])
wx.PostEvent(app.taskbar_icon, MuteSetEvent(muted=muted))
def toggle():