Hyprland dotfiles
| 1 | #!/bin/bash |
| 2 | # /* ---- 💫 https://github.com/JaKooLit 💫 ---- */ ## |
| 3 | # This script is used to play system sounds. |
| 4 | # Script is used by Volume.Sh and ScreenShots.sh |
| 5 | |
| 6 | theme="freedesktop" # Set the theme for the system sounds. |
| 7 | mute=false # Set to true to mute the system sounds. |
| 8 | |
| 9 | # Mute individual sounds here. |
| 10 | muteScreenshots=false |
| 11 | muteVolume=false |
| 12 | |
| 13 | # Exit if the system sounds are muted. |
| 14 | if ; then |
| 15 | |
| 16 | fi |
| 17 | |
| 18 | # Choose the sound to play. |
| 19 | if ; then |
| 20 | if ; then |
| 21 | |
| 22 | fi |
| 23 | soundoption="screen-capture.*" |
| 24 | elif ; then |
| 25 | if ; then |
| 26 | |
| 27 | fi |
| 28 | soundoption="audio-volume-change.*" |
| 29 | elif ; then |
| 30 | if ; then |
| 31 | |
| 32 | fi |
| 33 | soundoption="dialog-error.*" |
| 34 | else |
| 35 | |
| 36 | |
| 37 | fi |
| 38 | |
| 39 | # Set the directory defaults for system sounds. |
| 40 | if [; then |
| 41 | systemDIR="/run/current-system/sw/share/sounds" # NixOS |
| 42 | else |
| 43 | systemDIR="/usr/share/sounds" |
| 44 | fi |
| 45 | userDIR="/.local/share/sounds" |
| 46 | defaultTheme="freedesktop" |
| 47 | |
| 48 | # Prefer the user's theme, but use the system's if it doesn't exist. |
| 49 | sDIR="/" |
| 50 | if [; then |
| 51 | sDIR="/" |
| 52 | elif [; then |
| 53 | sDIR="/" |
| 54 | fi |
| 55 | |
| 56 | # Get the theme that it inherits. |
| 57 | iTheme= |
| 58 | iDIR="/../" |
| 59 | |
| 60 | # Find the sound file and play it. |
| 61 | sound_file= |
| 62 | if ! ; then |
| 63 | sound_file= |
| 64 | if ! ; then |
| 65 | sound_file= |
| 66 | if ! ; then |
| 67 | sound_file= |
| 68 | if ! ; then |
| 69 | |
| 70 | |
| 71 | fi |
| 72 | fi |
| 73 | fi |
| 74 | fi |
| 75 | |
| 76 | # pipewire priority, fallback pulseaudio |
| 77 | || |