diff --git a/scripts/linux/dconf-prefs.sh b/scripts/linux/dconf-prefs.sh index 67c02bd..8e55e6a 100644 --- a/scripts/linux/dconf-prefs.sh +++ b/scripts/linux/dconf-prefs.sh @@ -25,10 +25,11 @@ PARAMS=$* show_help () { echo -e "${PRIMARY_COLOR}🐧 Linux Desktop Preferences${RESET_COLOR}\n"\ - "${ACCENT_COLOR}This script will apply preferences to the GNOME shell and related applications using dconf\n"\ - "Config files are read from ./config/gnome and applied to the dconf database in ~/.config/dconf/[user]\n"\ + "${ACCENT_COLOR}This script will apply preferences to the GNOME shell and"\ + "related applications using dconf\n Config files are read from"\ + "./config/gnome and applied to the dconf database in ~/.config/dconf/[user]\n"\ "Before any changes are made, existing settings are backed up to ~/.cache/dconf-backups/\n"\ - "\nThe following applications will be configured:\n"\ + "\n The following applications will be configured:\n"\ " - Calculator\n"\ " - Evolution\n"\ " - Geddit\n"\ @@ -47,7 +48,7 @@ fi # Ask for user confirmation before proceeding (if skip flag isn't passed) if [[ ! $PARAMS == *"--yes-to-all"* ]]; then - echo -e "\n${PRIMARY_COLOR}Would you like to proceed? (y/N)${RESET_COLOR}" + echo -e "${PRIMARY_COLOR}Would you like to proceed? (y/N)${RESET_COLOR}" read -t 15 -n 1 -r if [[ ! $REPLY =~ ^[Yy]$ ]]; then echo -e "${ACCENT_COLOR}\nNo worries, nothing will be applied - feel free to come back another time." @@ -80,8 +81,7 @@ DCONF_SOURCE_DIR="$(cd "$(dirname "$0")" && pwd)/../../config/gnome" DCONF_BACKUP_PATH="${DCONF_BACKUP_DIR}/${DCONF_BACKUP_FILE}" mkdir -p $DCONF_BACKUP_PATH -# For a given dconf key ($1), and specified file ($2) -# check input info, backup existing config, then apply new settings +# For a given dconf key ($1), and specified file ($2), check info, make backup, apply settings apply_dconf () { dconf_key=$1 dconf_name=$2 @@ -94,7 +94,8 @@ apply_dconf () { # Check source file exists if [ ! -f "$DCONF_SOURCE_DIR/$dconf_name.toml" ]; then - echo -e "${ERROR_COLOR}⚠ Error, the specified config file for ${dconf_name} doesn't exist in ${DCONF_SOURCE_DIR}${RESET}" + echo -e "${ERROR_COLOR}⚠ Error, the specified config file for"\ + "'${dconf_name}' doesn't exist in ${DCONF_SOURCE_DIR}${RESET}" return fi @@ -117,3 +118,5 @@ apply_dconf '/org/gnome/evolution/' 'evolution' apply_dconf '/org/gnome/gedit/preferences/' 'gedit' apply_dconf '/org/gnome/gthumb/' 'gthumb' apply_dconf '/org/gnome/todo/' 'todo' + +# EOF \ No newline at end of file