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:
parent
24231c96b3
commit
03cf203c8c
@ -561,36 +561,48 @@ 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
|
||||||
if grep -q "^ColorPalette=" "${CONFFILE}"; then
|
read -r -p "All done - apply new theme? [y/N] " -n 1 XFCE4_APPLY_CURR_THEME
|
||||||
sed -i -r -e "s/^ColorPalette=.*/${L_COLORPALETTE}/" "${CONFFILE}"
|
if [[ ${XFCE4_APPLY_CURR_THEME::1} =~ ^(y|Y)$ ]]; then
|
||||||
else
|
if grep -q "^ColorPalette=" "${CONFFILE}"; then
|
||||||
echo "${L_COLORPALETTE}" >> "${CONFFILE}"
|
sed -i -r -e "s/^ColorPalette=.*/${L_COLORPALETTE}/" "${CONFFILE}"
|
||||||
fi
|
else
|
||||||
|
echo "${L_COLORPALETTE}" >> "${CONFFILE}"
|
||||||
if grep -q "^ColorCursor=" "${CONFFILE}"; then
|
fi
|
||||||
sed -i -r -e "s/^ColorCursor=.*/${L_COLORCURSOR}/" "${CONFFILE}"
|
|
||||||
else
|
if grep -q "^ColorCursor=" "${CONFFILE}"; then
|
||||||
echo "${L_COLORCURSOR}" >> "${CONFFILE}"
|
sed -i -r -e "s/^ColorCursor=.*/${L_COLORCURSOR}/" "${CONFFILE}"
|
||||||
fi
|
else
|
||||||
|
echo "${L_COLORCURSOR}" >> "${CONFFILE}"
|
||||||
|
fi
|
||||||
|
|
||||||
if grep -q "^ColorForeground=" "${CONFFILE}"; then
|
if grep -q "^ColorForeground=" "${CONFFILE}"; then
|
||||||
sed -i -r -e "s/^ColorForeground=.*/ColorForeground=${FOREGROUND_COLOR}/" "${CONFFILE}"
|
sed -i -r -e "s/^ColorForeground=.*/ColorForeground=${FOREGROUND_COLOR}/" "${CONFFILE}"
|
||||||
else
|
else
|
||||||
echo "ColorForeground=${FOREGROUND_COLOR}" >> "${CONFFILE}"
|
echo "ColorForeground=${FOREGROUND_COLOR}" >> "${CONFFILE}"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if grep -q "^ColorBackground=" "${CONFFILE}"; then
|
if grep -q "^ColorBackground=" "${CONFFILE}"; then
|
||||||
sed -i -r -e "s/^ColorBackground=.*/ColorBackground=${BACKGROUND_COLOR}/" "${CONFFILE}"
|
sed -i -r -e "s/^ColorBackground=.*/ColorBackground=${BACKGROUND_COLOR}/" "${CONFFILE}"
|
||||||
else
|
else
|
||||||
echo "ColorBackground=${BACKGROUND_COLOR}" >> "${CONFFILE}"
|
echo "ColorBackground=${BACKGROUND_COLOR}" >> "${CONFFILE}"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if grep -q "^ColorCursorUseDefault=FALSE" "${CONFFILE}"; then
|
if grep -q "^ColorCursorUseDefault=FALSE" "${CONFFILE}"; then
|
||||||
true
|
true
|
||||||
else
|
else
|
||||||
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)"
|
||||||
|
Loading…
Reference in New Issue
Block a user