diff options
| author | KKV9 <ciaranob.cob@gmail.com> | 2024-01-28 21:06:07 +0000 |
|---|---|---|
| committer | KKV9 <ciaranob.cob@gmail.com> | 2024-01-28 21:06:07 +0000 |
| commit | e2c1144266279c6b522b4ff7e96f578f85b0fcbf (patch) | |
| tree | 0082db8f58908d5855b21f888226b48245b924ec /config/hypr/UserScripts/Sounds.sh | |
| parent | 628364022eca36c2d02f13635c49b6c766622fea (diff) | |
Fix fallback sounds
Fix Sounds.sh not finding files correctly.
Diffstat (limited to 'config/hypr/UserScripts/Sounds.sh')
| -rwxr-xr-x | config/hypr/UserScripts/Sounds.sh | 23 |
1 files changed, 10 insertions, 13 deletions
diff --git a/config/hypr/UserScripts/Sounds.sh b/config/hypr/UserScripts/Sounds.sh index bc27c92c..0d2bfff7 100755 --- a/config/hypr/UserScripts/Sounds.sh +++ b/config/hypr/UserScripts/Sounds.sh @@ -49,20 +49,17 @@ iDIR="$sDIR/../$iTheme" # Find the sound file and play it. sound_file=$(find $sDIR/stereo -name "$soundoption" -print -quit) -if test -f "$sound_file"; then - pw-play "$sound_file" -else +if ! test -f "$sound_file"; then sound_file=$(find $iDIR/stereo -name "$soundoption" -print -quit) - if test -f "$sound_file"; then - pw-play "$sound_file" - elif test -f "$userDIR/$defaultTheme/$soundoption"; then - pw-play "$userDIR/$defaultTheme/$soundoption" - else - if test -f "$systemDIR/$defaultTheme/$soundoption"; then - pw-play "$systemDIR/$defaultTheme/$soundoption" - else - echo "Error: Sound file not found." - exit 1 + if ! test -f "$sound_file"; then + sound_file=$(find $userDIR/$defaultTheme/stereo -name "$soundoption" -print -quit) + if ! test -f "$sound_file"; then + sound_file=$(find $systemDIR/$defaultTheme/stereo -name "$soundoption" -print -quit) + if ! test -f "$sound_file"; then + echo "Error: Sound file not found." + exit 1 + fi fi fi fi +pw-play "$sound_file" |
