From df3c3790be9b401c324c8feaefea9bd6e143a135 Mon Sep 17 00:00:00 2001 From: Vince Date: Wed, 21 Apr 2021 18:40:03 +0800 Subject: [PATCH] Fixed #198 --- install.sh | 3 +++ lib-core.sh | 1 + lib-install.sh | 6 +++++ src/sass/_theme-options.scss | 3 +++ src/sass/gnome-shell/common/_dash.scss | 36 +++++++++++++++----------- 5 files changed, 34 insertions(+), 15 deletions(-) diff --git a/install.sh b/install.sh index 671ace63..888c2794 100755 --- a/install.sh +++ b/install.sh @@ -35,6 +35,7 @@ usage() { helpify "-i, --icon" "[$(IFS='|'; echo "${ICON_VARIANTS[*]}")]" "Set 'Activities' icon" "Default is 'standard'" helpify "-N, --nautilus-style" "[$(IFS='|'; echo "${NAUTILUS_STYLE_VARIANTS[*]}")]" "Set Nautilus style" "Default is BigSur-like style" helpify "-R, --round" "" "Set maximized window to rounded" "Default is square" + helpify "--normal, --normalshowapps" "" "Set gnome-shell show apps button style to normal" "Default is bigsur" helpify "--dialog, --interactive" "" "Run this installer interactively, with dialogs" "" helpify "-r, --remove, -u, --uninstall" "" "Remove all installed ${THEME_NAME} themes" "" helpify "-h, --help" "" "Show this help" "" @@ -62,6 +63,8 @@ while [[ $# -gt 0 ]]; do uninstall='true'; shift ;; --dialog|--interactive) interactive='true'; shift ;; + --normal|--normalshowapps) + showapps_normal="true"; shift ;; -R|--round) max_round="true"; shift ;; -h|--help) diff --git a/lib-core.sh b/lib-core.sh index 7282d4a2..cc207586 100755 --- a/lib-core.sh +++ b/lib-core.sh @@ -119,6 +119,7 @@ snap="false" gdm="false" dash_to_dock="false" max_round="false" +showapps_normal="false" # Misc msg="Run '${0} --help' to explore more customization features!" diff --git a/lib-install.sh b/lib-install.sh index 6f1f20a8..89e4a382 100755 --- a/lib-install.sh +++ b/lib-install.sh @@ -531,6 +531,12 @@ customize_theme() { sed ${SED_OPT} "/\$panel_opacity/s/0.15/0.${panel_opacity}/" "${THEME_SRC_DIR}/sass/_theme-options-temp.scss" fi + # Change gnome-shell show apps button style + if [[ "${showapps_normal}" == 'true' ]]; then + prompt -w "Changing gnome-shell show apps button style ..." + sed ${SED_OPT} "/\$showapps_button/s/bigsur/normal/" "${THEME_SRC_DIR}/sass/_theme-options-temp.scss" + fi + # Change Nautilus sidarbar size if [[ "${sidebar_size}" != 'default' ]]; then prompt -w "Changing Nautilus sidebar size ..." diff --git a/src/sass/_theme-options.scss b/src/sass/_theme-options.scss index 449c8fd3..d4e4d757 100644 --- a/src/sass/_theme-options.scss +++ b/src/sass/_theme-options.scss @@ -14,5 +14,8 @@ $nautilus_style: 'stable'; // Gnome-shell panel opacity $panel_opacity: 0.15; +// Gnome-shell show apps button style +$showapps_button: 'bigsur'; + // maximized window radius $max_window_style: 'square'; diff --git a/src/sass/gnome-shell/common/_dash.scss b/src/sass/gnome-shell/common/_dash.scss index 3727a900..8e7eb8a9 100644 --- a/src/sass/gnome-shell/common/_dash.scss +++ b/src/sass/gnome-shell/common/_dash.scss @@ -24,20 +24,26 @@ $dash_placeholder_size: 32px; -x-offset: 8px; } +%show_apps_bigsur { + .show-apps-icon { + color: transparent; + background-image: url("assets/view-app-grid.svg"); + background-size: contain; + } + + .overview-icon { color: transparent; } + + &:hover, + &:active, + &:checked, + &:focus { + .show-apps-icon { color: transparent; } + } +} + // Show apps button -.show-apps .show-apps-icon { - color: transparent; - background-image: url("assets/view-app-grid.svg"); - background-size: contain; -} - -.show-apps .overview-icon { - color: transparent; -} - -.show-apps:hover .show-apps-icon, -.show-apps:active .show-apps-icon, -.show-apps:checked .show-apps-icon, -.show-apps:focus .show-apps-icon { - color: transparent; +.show-apps { + @if $showapps_button == "bigsur" { + @extend %show_apps_bigsur; + } }