From 9166992af508dce1f76b67f81898d28999e796e9 Mon Sep 17 00:00:00 2001 From: vinceliuice Date: Sun, 1 Sep 2024 21:37:48 +0800 Subject: [PATCH] Fixed #1118 --- README.md | 6 +++--- install.sh | 4 ++-- shell/lib-core.sh | 12 ++++++++++++ shell/lib-install.sh | 2 +- 4 files changed, 18 insertions(+), 6 deletions(-) diff --git a/README.md b/README.md index e4b8df1a..4299af91 100644 --- a/README.md +++ b/README.md @@ -103,14 +103,14 @@ Usage: `./install.sh [OPTIONS...]` 2. -b, -background [default|blank|IMAGE_PATH] Set gnome-shell background image. Default is BigSur-like wallpaper - 3. -o, -opacity [default|30|45|60|75] + 3. -p, -panelopacity [default|30|45|60|75] Set gnome-shell panel transparency. Default is 15% 4. -h, -height [default|smaller|bigger] Set gnome-shell panel height size. Default is 32px - 5. -n, -normal - Set gnome-shell show apps button style to normal. Default is BigSur + 5. -g, -general, -normal + Set gnome-shell show apps button style to general/normal. Default is BigSur 6. -s, -smaller Set gnome-shell font size to smaller (10pt). Default is 11pt diff --git a/install.sh b/install.sh index d4779f87..62314e43 100755 --- a/install.sh +++ b/install.sh @@ -102,11 +102,11 @@ while [[ $# -gt 0 ]]; do check_param "${1}" "${1}" "${2}" "must" "must" "must" && shift 2 || shift ;; -b|-background) check_param "${1}" "${1}" "${2}" "must" "must" "must" "false" && shift 2 || shift ;; - -o|-opacity) + -p|-panelopacity) check_param "${1}" "${1}" "${2}" "optional" "optional" "optional" && shift 2 || shift ;; -h|-height) check_param "${1}" "${1}" "${2}" "optional" "optional" "optional" && shift 2 || shift ;; - -n|-normal) + -g|-general|-normal) showapps_normal="true"; shift ;; -s|-smaller) smaller_font="true"; shift ;; diff --git a/shell/lib-core.sh b/shell/lib-core.sh index d5a97fb5..fc29321b 100755 --- a/shell/lib-core.sh +++ b/shell/lib-core.sh @@ -437,10 +437,16 @@ parsimplify() { echo "-i" ;; --theme) echo "-t" ;; + -height) + echo "-h" ;; + -panelopacity) + echo "-p" ;; --panel-opacity) echo "-p" ;; --panel-size) echo "-P" ;; + --nautilus) + echo "-N" ;; --nautilus-style) echo "-N" ;; --background) @@ -556,6 +562,12 @@ check_param() { panel_size="${value}"; variant_found="true"; break fi done ;; + -h) + for i in {0..2}; do + if [[ "${value}" == "${PANEL_SIZE_VARIANTS[i]}" ]]; then + panel_size="${value}"; variant_found="true"; break + fi + done ;; -a) if [[ "${value}" == "all" ]]; then for i in {0..2}; do diff --git a/shell/lib-install.sh b/shell/lib-install.sh index 4d4bcd8e..799e8540 100755 --- a/shell/lib-install.sh +++ b/shell/lib-install.sh @@ -954,7 +954,7 @@ customize_theme() { # Change gnome-shell panel transparency if [[ "${panel_opacity}" != 'default' ]]; then - prompt -s "Changing panel transparency ...\n" + prompt -s "Changing panel transparency to ${panel_opacity}% ...\n" sed $SED_OPT "/\$panel_opacity/s/0.15/0.${panel_opacity}/" "${THEME_SRC_DIR}/sass/_theme-options-temp.scss" fi