-
Notifications
You must be signed in to change notification settings - Fork 903
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
1 changed file
with
27 additions
and
0 deletions.
There are no files selected for viewing
27 changes: 27 additions & 0 deletions
27
commands/system/audio/toggle-mute-notification-sounds.applescript
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 | ||
|