mirror of
https://github.com/Lissy93/dotfiles.git
synced 2025-06-29 05:11:20 +02:00
Updates structure in dconf
This commit is contained in:
parent
ad4ed0da70
commit
dadddea718
@ -25,8 +25,9 @@ PARAMS=$*
|
|||||||
|
|
||||||
show_help () {
|
show_help () {
|
||||||
echo -e "${PRIMARY_COLOR}🐧 Linux Desktop Preferences${RESET_COLOR}\n"\
|
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"\
|
"${ACCENT_COLOR}This script will apply preferences to the GNOME shell and"\
|
||||||
"Config files are read from ./config/gnome and applied to the dconf database in ~/.config/dconf/[user]\n"\
|
"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"\
|
"Before any changes are made, existing settings are backed up to ~/.cache/dconf-backups/\n"\
|
||||||
"\n The following applications will be configured:\n"\
|
"\n The following applications will be configured:\n"\
|
||||||
" - Calculator\n"\
|
" - Calculator\n"\
|
||||||
@ -47,7 +48,7 @@ fi
|
|||||||
|
|
||||||
# Ask for user confirmation before proceeding (if skip flag isn't passed)
|
# Ask for user confirmation before proceeding (if skip flag isn't passed)
|
||||||
if [[ ! $PARAMS == *"--yes-to-all"* ]]; then
|
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
|
read -t 15 -n 1 -r
|
||||||
if [[ ! $REPLY =~ ^[Yy]$ ]]; then
|
if [[ ! $REPLY =~ ^[Yy]$ ]]; then
|
||||||
echo -e "${ACCENT_COLOR}\nNo worries, nothing will be applied - feel free to come back another time."
|
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}"
|
DCONF_BACKUP_PATH="${DCONF_BACKUP_DIR}/${DCONF_BACKUP_FILE}"
|
||||||
mkdir -p $DCONF_BACKUP_PATH
|
mkdir -p $DCONF_BACKUP_PATH
|
||||||
|
|
||||||
# For a given dconf key ($1), and specified file ($2)
|
# For a given dconf key ($1), and specified file ($2), check info, make backup, apply settings
|
||||||
# check input info, backup existing config, then apply new settings
|
|
||||||
apply_dconf () {
|
apply_dconf () {
|
||||||
dconf_key=$1
|
dconf_key=$1
|
||||||
dconf_name=$2
|
dconf_name=$2
|
||||||
@ -94,7 +94,8 @@ apply_dconf () {
|
|||||||
|
|
||||||
# Check source file exists
|
# Check source file exists
|
||||||
if [ ! -f "$DCONF_SOURCE_DIR/$dconf_name.toml" ]; then
|
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
|
return
|
||||||
fi
|
fi
|
||||||
|
|
||||||
@ -117,3 +118,5 @@ apply_dconf '/org/gnome/evolution/' 'evolution'
|
|||||||
apply_dconf '/org/gnome/gedit/preferences/' 'gedit'
|
apply_dconf '/org/gnome/gedit/preferences/' 'gedit'
|
||||||
apply_dconf '/org/gnome/gthumb/' 'gthumb'
|
apply_dconf '/org/gnome/gthumb/' 'gthumb'
|
||||||
apply_dconf '/org/gnome/todo/' 'todo'
|
apply_dconf '/org/gnome/todo/' 'todo'
|
||||||
|
|
||||||
|
# EOF
|
Loading…
x
Reference in New Issue
Block a user