Skip to content

Commit bc8aff3

Browse files
annietmadehesa
authored andcommitted
toggle mute
1 parent b68f2f7 commit bc8aff3

File tree

1 file changed

+27
-0
lines changed

1 file changed

+27
-0
lines changed
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
#!/usr/bin/osascript
2+
3+
# Required parameters:
4+
# @raycast.schemaVersion 1
5+
# @raycast.title Toggle Mute Notifcation Sounds
6+
# @raycast.mode silent
7+
# @raycast.packageName System
8+
9+
# Optional parameters:
10+
# @raycast.icon 🔔
11+
12+
# Documentation:
13+
# @raycast.author Annie Ma
14+
# @raycast.authorURL http://www.anniema.co/
15+
# @raycast.description Toggles notification sounds.
16+
17+
set volumeSettings to get volume settings
18+
set alertVolume to alert volume of volumeSettings
19+
20+
if alertVolume > 0 then
21+
set volume alert volume 0
22+
display notification "" with title "Muted notification sounds"
23+
else
24+
set volume alert volume 100
25+
display notification "" with title "Unmuted notification sounds"
26+
end if
27+

0 commit comments

Comments
 (0)