From 47101284b0b654eb0c83a1bd20725c7580eb87a0 Mon Sep 17 00:00:00 2001 From: KKV9 Date: Sun, 28 Jan 2024 20:08:38 +0000 Subject: [PATCH] Allow muting individual sounds Allow user to mute volume ONLY or screenshots ONLY. --- config/hypr/UserScripts/Sounds.sh | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/config/hypr/UserScripts/Sounds.sh b/config/hypr/UserScripts/Sounds.sh index 99ec9da..a2523a2 100755 --- a/config/hypr/UserScripts/Sounds.sh +++ b/config/hypr/UserScripts/Sounds.sh @@ -5,6 +5,10 @@ theme="freedesktop" # Set the theme for the system sounds. muted=false # Set to true to mute the system sounds. +# Mute individual sounds here. +mutedScreenshots=false +muteVolume=false + # Exit if the system sounds are muted. if [[ "$muted" = true ]]; then exit 0 @@ -12,8 +16,14 @@ fi # Choose the sound to play. if [[ "$1" == "--shutter" ]]; then + if [[ "$mutedScreenshots" = true ]]; then + exit 0 + fi soundoption="camera-shutter.*" elif [[ "$1" == "--volume" ]]; then + if [[ "$muteVolume" = true ]]; then + exit 0 + fi soundoption="audio-volume-change.*" else echo -e "Available sounds: --shutter, --volume"