Skip to content

Commit

Permalink
toggle mute
Browse files Browse the repository at this point in the history
  • Loading branch information
annietma authored and dehesa committed Feb 1, 2024
1 parent b68f2f7 commit bc8aff3
Showing 1 changed file with 27 additions and 0 deletions.
27 changes: 27 additions & 0 deletions commands/system/audio/toggle-mute-notification-sounds.applescript
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
#!/usr/bin/osascript

# Required parameters:
# @raycast.schemaVersion 1
# @raycast.title Toggle Mute Notifcation Sounds
# @raycast.mode silent
# @raycast.packageName System

# Optional parameters:
# @raycast.icon 🔔

# Documentation:
# @raycast.author Annie Ma
# @raycast.authorURL http://www.anniema.co/
# @raycast.description Toggles notification sounds.

set volumeSettings to get volume settings
set alertVolume to alert volume of volumeSettings

if alertVolume > 0 then
set volume alert volume 0
display notification "" with title "Muted notification sounds"
else
set volume alert volume 100
display notification "" with title "Unmuted notification sounds"
end if

0 comments on commit bc8aff3

Please sign in to comment.