From 8fd23ee26354ce6c67be623572d21be1481434cb Mon Sep 17 00:00:00 2001 From: vinceliuice Date: Tue, 29 Jul 2025 09:23:58 +0800 Subject: [PATCH] update --- install.sh | 2 +- libs/lib-install.sh | 18 +++++++++++------- 2 files changed, 12 insertions(+), 8 deletions(-) diff --git a/install.sh b/install.sh index 70c32dd3..5a5701ee 100755 --- a/install.sh +++ b/install.sh @@ -186,7 +186,7 @@ else if [[ "${libadwaita}" == 'true' ]]; then if [[ "$UID" != '0' ]]; then - install_libadwaita && reset_gtk_base + install_libadwaita echo; prompt -w "Some colorsheme extension will re-writes config files in '${HOME}/.config/gtk-4.0' like: 'custom-accent-colors' you need to disable it!" else echo; prompt -e "Do not run '--libadwaita' option with sudo!" diff --git a/libs/lib-install.sh b/libs/lib-install.sh index edc4ab8d..7c1c58cc 100755 --- a/libs/lib-install.sh +++ b/libs/lib-install.sh @@ -537,11 +537,6 @@ config_gtk4() { prompt -s "\n Installed ${name}${color}${opacity}${alt}${theme}${scheme} gtk-4.0 theme in '${HOME}/.config/gtk-4.0' for libadwaita!" } -reset_gtk_base() { - libadwaita='false' - accent_type='fixed' -} - install_libadwaita() { color="${colors[0]}" opacity="${opacities[0]}" @@ -551,7 +546,7 @@ install_libadwaita() { install_theme_deps - gtk_base && config_gtk4 "${color}" "${opacity}" "${alt}" "${theme}" "${scheme}" + libadwaita_base && config_gtk4 "${color}" "${opacity}" "${alt}" "${theme}" "${scheme}" } remove_libadwaita() { @@ -918,6 +913,11 @@ disconnect_flatpak() { # GTK BASE # ######################################################################### +reset_gtk_base() { + libadwaita='false' + accent_type='fixed' +} + gtk_base() { cp -rf "${THEME_SRC_DIR}/sass/_gtk-base"{".scss","-temp.scss"} @@ -938,6 +938,10 @@ gtk_base() { sed $SED_OPT "/\$scheme/s/standard/nord/" "${THEME_SRC_DIR}/sass/_gtk-base-temp.scss" accent_type="fixed" fi +} + +libadwaita_base() { + gtk_base if [[ "${GNOME_VERSION}" -ge '47-0' && "${libadwaita}" == 'true' ]]; then sed $SED_OPT "/\$gnome_version/s/old/new/" "${THEME_SRC_DIR}/sass/_gtk-base-temp.scss" @@ -967,7 +971,7 @@ shell_base() { customize_theme() { cp -rf "${THEME_SRC_DIR}/sass/_theme-options"{".scss","-temp.scss"} - if [[ "${GNOME_VERSION}" -ge '47-0' ]]; then + if [[ "${GNOME_VERSION}" -ge '47-0' && "${accent_type}" != 'fixed' ]]; then sed $SED_OPT "/\$shell_version/s/old/new/" "${THEME_SRC_DIR}/sass/_theme-options-temp.scss" fi