#!/bin/bash yad --title "System Sounds" --question --text " Would you like to turn On system sounds in Peppermint ? (will not become active until next login) The sound theme used by default is Yaru" --width=450 --text-align=center --button="Off:1" --button="On:0" 2> /dev/null foo=$? user_home=$(getent passwd $SUDO_USER | cut -d: -f6) if [[ $foo -eq 0 ]]; then # if [ ! -e /etc/X11/Xsession.d/52libcanberra-gtk-module_add-to-gtk-modules ]; then cp -f /usr/lib/peppermint/adjustments/52libcanberra-gtk-module_add-to-gtk-modules /etc/X11/Xsession.d/ cp -f /usr/lib/peppermint/adjustments/52libcanberra-gtk3-module_add-to-gtk-modules /etc/X11/Xsession.d/ cp /usr/share/peppermint/autostart/'USB Device Sounds.desktop' $user_home/.config/autostart/'USB Device Sounds.desktop' cp /usr/share/peppermint/autostart/'Power Plug Sounds.desktop' $user_home/.config/autostart/'Power Plug Sounds.desktop' elif [[ $foo -eq 1 ]]; then # if [ -e /etc/X11/Xsession.d/52libcanberra-gtk-module_add-to-gtk-modules ]; then rm -f /etc/X11/Xsession.d/52libcanberra-gtk-module_add-to-gtk-modules rm -f /etc/X11/Xsession.d/52libcanberra-gtk3-module_add-to-gtk-modules rm $user_home/.config/autostart/'USB Device Sounds.desktop' rm $user_home/.config/autostart/'Power Plug Sounds.desktop' else exit 0 fi