1
0
mirror of https://github.com/Mayccoll/Gogh.git synced 2023-08-10 21:12:46 +03:00

ask if user want's to apply newsly installed themes

This commit is contained in:
polemon 2019-03-19 18:53:30 +01:00
parent 24231c96b3
commit 03cf203c8c

View File

@ -561,6 +561,8 @@ apply_xfce4-terminal() {
# any of the themes in there. The color settings need to # any of the themes in there. The color settings need to
# be written there directly. # be written there directly.
if ((LOOP == OPTLENGTH)); then if ((LOOP == OPTLENGTH)); then
read -r -p "All done - apply new theme? [y/N] " -n 1 XFCE4_APPLY_CURR_THEME
if [[ ${XFCE4_APPLY_CURR_THEME::1} =~ ^(y|Y)$ ]]; then
if grep -q "^ColorPalette=" "${CONFFILE}"; then if grep -q "^ColorPalette=" "${CONFFILE}"; then
sed -i -r -e "s/^ColorPalette=.*/${L_COLORPALETTE}/" "${CONFFILE}" sed -i -r -e "s/^ColorPalette=.*/${L_COLORPALETTE}/" "${CONFFILE}"
else else
@ -591,6 +593,16 @@ apply_xfce4-terminal() {
echo "ColorCursorUseDefault=FALSE" >> "${CONFFILE}" echo "ColorCursorUseDefault=FALSE" >> "${CONFFILE}"
fi fi
fi fi
fi
unset SCHEMEDIR
unset CONFFILE
unset PROFILE_NAME
unset F_NAME
unset FF_NAME
unset L_COLORCURSOR
unset L_COLORPALETTE
exit 0
} }
[[ -n "${UUIDGEN}" ]] && PROFILE_SLUG="$(uuidgen)" [[ -n "${UUIDGEN}" ]] && PROFILE_SLUG="$(uuidgen)"