Browse Source

PATCH: userscripts/Sounds.sh: for Non-FHS systems, use the runtime dir

on Non-FHS systems like NixOS, the system sounds are located
in /run/current-system/sw/share/sounds according to XDG specification
This patch allows the script to fallback to this directory if the
sound files are not found in /usr/share/sounds or $HOME/.local/share/sounds
pull/189/head
John Titor 2 years ago
parent
commit
aa26c4431c
No known key found for this signature in database
GPG Key ID: 29B0514F4E3C1CC0
  1. 3
      config/hypr/UserScripts/Sounds.sh

3
config/hypr/UserScripts/Sounds.sh

@ -33,6 +33,7 @@ fi
# Set the directory defaults for system sounds.
userDIR="$HOME/.local/share/sounds"
systemDIR="/usr/share/sounds"
systemRuntimeDIR="/run/current-system/sw/share/sounds"
defaultTheme="freedesktop"
# Prefer the user's theme, but use the system's if it doesn't exist.
@ -41,6 +42,8 @@ if [ -d "$userDIR/$theme" ]; then
sDIR="$userDIR/$theme"
elif [ -d "$systemDIR/$theme" ]; then
sDIR="$systemDIR/$theme"
elif [ -d "$systemRuntimeDIR/$theme" ]; then
sDIR="$systemRuntimeDIR/$theme"
fi
# Get the theme that it inherits.

Loading…
Cancel
Save