From 4ce80c209b68782ddcc44e80feff86bb72f7e9cf Mon Sep 17 00:00:00 2001 From: vinceliuice Date: Sun, 24 Nov 2024 23:59:23 +0800 Subject: [PATCH] Fixed #1176 --- README.md | 3 +++ install.sh | 12 ++++++++---- libs/lib-install.sh | 4 ++++ src/sass/_gtk-base.scss | 3 +++ src/sass/gnome-shell/_common.scss | 2 +- src/sass/gtk/_colors-libadwaita.scss | 2 +- 6 files changed, 20 insertions(+), 6 deletions(-) diff --git a/README.md b/README.md index b8c52cea..254be791 100644 --- a/README.md +++ b/README.md @@ -91,6 +91,9 @@ OPTIONS: -l, --libadwaita Install theme into gtk4.0 config for libadwaita. Default is dark version + -f, --fixed + Install fixed accent color version. Default is adaptive version + -HD, --highdefinition Set to High Definition size. Default is laptop size diff --git a/install.sh b/install.sh index 54f7a2d9..0332eb56 100755 --- a/install.sh +++ b/install.sh @@ -35,6 +35,7 @@ usage() { helpify "-m, --monterey" "" " Set to MacOS Monterey style" "" helpify "-N, --nautilus" "[$(IFS='|'; echo "${NAUTILUS_STYLE_VARIANTS[*]}")]" " Set Nautilus style" "Default is BigSur-like style (stabled sidebar)" helpify "-l, --libadwaita" "" " Install theme into gtk4.0 config for libadwaita" "Default is dark version" + helpify "-f, --fixed" "" " Install fixed accent color version" "Default is adaptive version" helpify "-HD, --highdefinition" "" " Set to High Definition size" "Default is laptop size" helpify "--shell, --gnomeshell" "" " Tweaks for gnome-shell" "Options:" @@ -129,6 +130,8 @@ while [[ $# -gt 0 ]]; do monterey="true"; shift ;; -l|--libadwaita) libadwaita="true"; shift ;; + -f|--fixed) + accent_type="fixed"; shift ;; -r|--remove|-u|-uninstall) uninstall='true'; shift ;; --silent-mode) @@ -167,10 +170,11 @@ if [[ "${uninstall}" == 'true' ]]; then fi else if [[ "${interactive}" == 'true' ]]; then - show_panel_opacity_dialog; show_sidebar_size_dialog; show_nautilus_style_dialog - echo; prompt -w "DIALOG: '--size' and '--panel' parameters are ignored if exist."; echo - else - show_needed_dialogs + show_panel_opacity_dialog +# show_sidebar_size_dialog + show_nautilus_style_dialog +# else +# show_needed_dialogs fi prompt -w "Removing the old '${name}' themes...\n" diff --git a/libs/lib-install.sh b/libs/lib-install.sh index 7a33fea1..e8ccfedc 100755 --- a/libs/lib-install.sh +++ b/libs/lib-install.sh @@ -895,6 +895,10 @@ 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" fi + + if [[ "${accent_type}" == 'fixed' ]]; then + sed $SED_OPT "/\$accent_type/s/default/fixed/" "${THEME_SRC_DIR}/sass/_gtk-base-temp.scss" + fi } shell_base() { diff --git a/src/sass/_gtk-base.scss b/src/sass/_gtk-base.scss index 07e2226c..512f2bde 100644 --- a/src/sass/_gtk-base.scss +++ b/src/sass/_gtk-base.scss @@ -6,3 +6,6 @@ $scheme: 'standard'; // Gnome version $gnome_version: 'old'; + +// Accent type +$accent_type: 'default'; diff --git a/src/sass/gnome-shell/_common.scss b/src/sass/gnome-shell/_common.scss index 1d9576e5..bd29bcb7 100644 --- a/src/sass/gnome-shell/_common.scss +++ b/src/sass/gnome-shell/_common.scss @@ -23,7 +23,7 @@ $cakeisalie: "This stylesheet is generated, DO NOT EDIT"; * Inc., 51 Franklin St - Fifth Floor, Boston, MA 02110-1301 USA. */ -@if $gnome_version == 'new' { +@if $gnome_version == 'new' and $accent_type == 'default' { $selected_bg_color: -st-accent-color; $primary_color: -st-accent-color; } diff --git a/src/sass/gtk/_colors-libadwaita.scss b/src/sass/gtk/_colors-libadwaita.scss index c9d27f8c..d6b75c6f 100644 --- a/src/sass/gtk/_colors-libadwaita.scss +++ b/src/sass/gtk/_colors-libadwaita.scss @@ -105,7 +105,7 @@ $dark_5: #000000; // The main accent color and the matching text value -@if $gnome_version == 'old' { +@if $gnome_version == 'old' or $accent_type == 'fixed' { @define-color accent_bg_color #{$primary_color}; @define-color accent_fg_color #{$light_fg_color}; }