mirror of
https://github.com/vinceliuice/WhiteSur-gtk-theme.git
synced 2025-06-06 07:23:02 +00:00
Fixed #1148
This commit is contained in:
parent
790b4ecc7c
commit
ea95cfa5e2
@ -177,7 +177,7 @@ else
|
|||||||
|
|
||||||
remove_themes; customize_theme; avoid_variant_duplicates;
|
remove_themes; customize_theme; avoid_variant_duplicates;
|
||||||
|
|
||||||
prompt -w "Installing '${name}' '${themes[*]}' '${schemes[*]}' themes in '${dest}'...\n";
|
prompt -w "Installing '${name}' themes in '${dest}'...\n";
|
||||||
|
|
||||||
prompt -t "--->>> GTK | GNOME Shell | Cinnamon | Metacity | XFWM | Plank <<<---"
|
prompt -t "--->>> GTK | GNOME Shell | Cinnamon | Metacity | XFWM | Plank <<<---"
|
||||||
prompt -i "Color variants : $( IFS=';'; echo "${colors[*]}" )"
|
prompt -i "Color variants : $( IFS=';'; echo "${colors[*]}" )"
|
||||||
@ -193,7 +193,6 @@ else
|
|||||||
if [[ "${libadwaita}" == 'true' ]]; then
|
if [[ "${libadwaita}" == 'true' ]]; then
|
||||||
if [[ "$UID" != '0' ]]; then
|
if [[ "$UID" != '0' ]]; then
|
||||||
install_libadwaita
|
install_libadwaita
|
||||||
echo; prompt -s "Installed ${name} ${opacities} ${colors} gtk-4.0 theme in '${HOME}/.config/gtk-4.0' for libadwaita!"
|
|
||||||
echo; prompt -w "Some colorsheme extension will re-writes config files in '${HOME}/.config/gtk-4.0' like: 'custom-accent-colors' you need disable it!"
|
echo; prompt -w "Some colorsheme extension will re-writes config files in '${HOME}/.config/gtk-4.0' like: 'custom-accent-colors' you need disable it!"
|
||||||
else
|
else
|
||||||
echo; prompt -e "Do not run '--libadwaita' option with sudo!"
|
echo; prompt -e "Do not run '--libadwaita' option with sudo!"
|
||||||
|
@ -577,9 +577,7 @@ check_param() {
|
|||||||
done ;;
|
done ;;
|
||||||
-c)
|
-c)
|
||||||
for i in {0..1}; do
|
for i in {0..1}; do
|
||||||
if [[ "${value}" == "${COLOR_VARIANTS[i]}" ]]; then
|
if [[ "${value}" == "${COLOR_VARIANTS[i]}" || "${value}" == "${COMMAND_COLOR_VARIANTS[i]}" ]]; then
|
||||||
colors+=("${COLOR_VARIANTS[i]}"); variant_found="true"; break
|
|
||||||
elif [[ "${value}" == "${COMMAND_COLOR_VARIANTS[i]}" ]]; then
|
|
||||||
colors+=("${COLOR_VARIANTS[i]}"); variant_found="true"; break
|
colors+=("${COLOR_VARIANTS[i]}"); variant_found="true"; break
|
||||||
fi
|
fi
|
||||||
done ;;
|
done ;;
|
||||||
|
@ -517,35 +517,40 @@ remove_old_packy() {
|
|||||||
|
|
||||||
config_gtk4() {
|
config_gtk4() {
|
||||||
local color="$(destify ${1})"
|
local color="$(destify ${1})"
|
||||||
local alt="$(destify ${2})"
|
local opacity="$(destify ${2})"
|
||||||
local scheme="$(destify ${3})"
|
local alt="$(destify ${3})"
|
||||||
|
local theme="$(destify ${4})"
|
||||||
|
local scheme="$(destify ${5})"
|
||||||
|
|
||||||
local TARGET_DIR="${HOME}/.config/gtk-4.0"
|
local TARGET_DIR="${HOME}/.config/gtk-4.0"
|
||||||
|
|
||||||
# Install gtk4.0 into config for libadwaita
|
# Install gtk4.0 into config for libadwaita
|
||||||
|
|
||||||
mkdir -p "${TARGET_DIR}"
|
mkdir -p "${TARGET_DIR}"
|
||||||
# backup_file "${TARGET_DIR}/gtk.css" "udo"
|
# backup_file "${TARGET_DIR}/gtk.css" "udo"
|
||||||
rm -rf "${TARGET_DIR}/"{gtk.css,gtk-Light.css,gtk-Dark.css,assets,windows-assets}
|
rm -rf "${TARGET_DIR}/"{gtk.css,gtk-dark.css,gtk-Light.css,gtk-Dark.css,assets,windows-assets}
|
||||||
sassc ${SASSC_OPT} "${THEME_SRC_DIR}/main/gtk-4.0/gtk-Light.scss" "${TARGET_DIR}/gtk-Light.css"
|
sassc ${SASSC_OPT} "${THEME_SRC_DIR}/main/gtk-4.0/gtk-Light.scss" "${TARGET_DIR}/gtk-Light.css"
|
||||||
sassc ${SASSC_OPT} "${THEME_SRC_DIR}/main/gtk-4.0/gtk-Dark.scss" "${TARGET_DIR}/gtk-Dark.css"
|
sassc ${SASSC_OPT} "${THEME_SRC_DIR}/main/gtk-4.0/gtk-Dark.scss" "${TARGET_DIR}/gtk-Dark.css"
|
||||||
ln -sf "${TARGET_DIR}/gtk-${color}.css" "${TARGET_DIR}/gtk.css"
|
ln -sf "${TARGET_DIR}/gtk${color}.css" "${TARGET_DIR}/gtk.css"
|
||||||
|
ln -sf "${TARGET_DIR}/gtk-Dark.css" "${TARGET_DIR}/gtk-dark.css"
|
||||||
cp -r "${THEME_SRC_DIR}/assets/gtk/common-assets/assets" "${TARGET_DIR}"
|
cp -r "${THEME_SRC_DIR}/assets/gtk/common-assets/assets" "${TARGET_DIR}"
|
||||||
cp -r "${THEME_SRC_DIR}/assets/gtk/common-assets/sidebar-assets/"*".png" "${TARGET_DIR}/assets"
|
cp -r "${THEME_SRC_DIR}/assets/gtk/common-assets/sidebar-assets/"*".png" "${TARGET_DIR}/assets"
|
||||||
cp -r "${THEME_SRC_DIR}/assets/gtk/scalable" "${TARGET_DIR}/assets"
|
cp -r "${THEME_SRC_DIR}/assets/gtk/scalable" "${TARGET_DIR}/assets"
|
||||||
cp -r "${THEME_SRC_DIR}/assets/gtk/windows-assets/titlebutton${alt}${scheme}" "${TARGET_DIR}/windows-assets"
|
cp -r "${THEME_SRC_DIR}/assets/gtk/windows-assets/titlebutton${alt}${scheme}" "${TARGET_DIR}/windows-assets"
|
||||||
|
|
||||||
|
prompt -s "\n Installed ${name}${color}${opacity}${alt}${theme}${scheme} gtk-4.0 theme in '${HOME}/.config/gtk-4.0' for libadwaita!"
|
||||||
}
|
}
|
||||||
|
|
||||||
install_libadwaita() {
|
install_libadwaita() {
|
||||||
|
color="${colors[0]}"
|
||||||
opacity="${opacities[0]}"
|
opacity="${opacities[0]}"
|
||||||
color="${colors[1]}"
|
|
||||||
scheme="${schemes[0]}"
|
|
||||||
|
|
||||||
gtk_base && config_gtk4 "${color}" "${alt}" "${scheme}"
|
gtk_base && config_gtk4 "${color}" "${opacity}" "${alt}" "${theme}" "${scheme}"
|
||||||
}
|
}
|
||||||
|
|
||||||
remove_libadwaita() {
|
remove_libadwaita() {
|
||||||
# restore_file "${TARGET_DIR}/gtk.css"
|
# restore_file "${TARGET_DIR}/gtk.css"
|
||||||
rm -rf "${HOME}/.config/gtk-4.0/"{gtk.css,gtk-Light.css,gtk-Dark.css,assets,windows-assets}
|
rm -rf "${HOME}/.config/gtk-4.0/"{gtk.css,gtk-dark.css,gtk-Light.css,gtk-Dark.css,assets,windows-assets}
|
||||||
}
|
}
|
||||||
|
|
||||||
###############################################################################
|
###############################################################################
|
||||||
|
@ -197,7 +197,7 @@ while [[ $# -gt 0 ]]; do
|
|||||||
gdm="true"; full_sudo "${1}"
|
gdm="true"; full_sudo "${1}"
|
||||||
showapps_normal="true" # use normal showapps icon
|
showapps_normal="true" # use normal showapps icon
|
||||||
background="default"
|
background="default"
|
||||||
|
shift
|
||||||
for variant in "${@}"; do
|
for variant in "${@}"; do
|
||||||
case "${variant}" in
|
case "${variant}" in
|
||||||
-i|-icon)
|
-i|-icon)
|
||||||
@ -225,7 +225,7 @@ while [[ $# -gt 0 ]]; do
|
|||||||
if ! has_command gdm && ! has_command gdm3 && [[ ! -e /usr/sbin/gdm3 ]]; then
|
if ! has_command gdm && ! has_command gdm3 && [[ ! -e /usr/sbin/gdm3 ]]; then
|
||||||
prompt -e "'${1}' ERROR: There's no GDM installed in your system"
|
prompt -e "'${1}' ERROR: There's no GDM installed in your system"
|
||||||
has_any_error="true"
|
has_any_error="true"
|
||||||
fi; shift ;;
|
fi ;;
|
||||||
-F|--flatpak)
|
-F|--flatpak)
|
||||||
flatpak="true"; signal_exit
|
flatpak="true"; signal_exit
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user