From 4d5abd54897ff1ebd1e21261d6e515aa4cb8557e Mon Sep 17 00:00:00 2001 From: Jeremiah Ticket Date: Thu, 28 Sep 2023 06:27:39 -0600 Subject: [PATCH] Added login sound option, uses canberra-gtk-play if installed, if not doesn't ask. --- i38.sh | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/i38.sh b/i38.sh index 2f7a8db..433c08f 100755 --- a/i38.sh +++ b/i38.sh @@ -366,6 +366,11 @@ brlapi=1 brlapi=$(yesno "Do you want to use a braille display with Orca?") sounds=1 sounds=$(yesno "Do you want window event sounds?") +# Play Login Sound +loginSound=1 +if command -v canberra-gtk-play &> /dev/null ; then + export loginSound=$(yesno "Would you like to play the default desktop-login sound according to your GTK sound theme upon login?") +fi if [[ -d "${i3Path}" ]]; then yesno "This will replace your existing configuration at ${i3Path}. Do you want to continue?" || exit 0 @@ -602,6 +607,9 @@ cat << EOF >> ${i3Path}/config $(if [[ $sounds -eq 0 ]]; then echo "exec_always --no-startup-id ${i3Path}/scripts/sound.py" fi +if [[ $loginSound -eq 0 ]]; then + echo 'exec --no-startup-id canberra-gtk-play -i desktop-login' +fi if [[ $brlapi -eq 0 ]]; then echo 'exec --no-startup-id xbrlapi --quiet' fi