From 47c2615e7a471e9b125caf46b256c820794ba8c0 Mon Sep 17 00:00:00 2001 From: vinceliuice Date: Tue, 27 Aug 2024 12:30:03 +0800 Subject: [PATCH] Fixed #1114 --- install.sh | 2 +- shell/lib-flatpak.sh | 12 ++++- shell/lib-install.sh | 45 ++++++++----------- .../common/icons/folder-download-symbolic.svg | 2 +- src/other/firefox/common/parts/icons.css | 4 +- tweaks.sh | 15 ++++--- 6 files changed, 42 insertions(+), 38 deletions(-) diff --git a/install.sh b/install.sh index 4972e048..f95810f5 100755 --- a/install.sh +++ b/install.sh @@ -163,7 +163,7 @@ else remove_themes; customize_theme; avoid_variant_duplicates; - prompt -w "Installing '${name}${colorscheme}' themes in '${dest}'...\n"; + prompt -w "Installing '${name}${colorscheme}' '${themes[*]}' themes in '${dest}'...\n"; prompt -t "--->>> GTK | GNOME Shell | Cinnamon | Metacity | XFWM | Plank <<<---" prompt -i "Color variants : $( IFS=';'; echo "${colors[*]}" )" diff --git a/shell/lib-flatpak.sh b/shell/lib-flatpak.sh index f1f63dbf..22e98e7d 100755 --- a/shell/lib-flatpak.sh +++ b/shell/lib-flatpak.sh @@ -30,6 +30,16 @@ pakitheme_gtk3() { if [[ -n "$theme_path" ]]; then prompt -i "Converting theme: $FLATPAK_THEME... \n" + elif [[ "${theme}" == '' ]]; then + prompt -e "Find other variant themes but could not locate deafult theme! \n" + prompt -s "Run this with right options! >>> \n" + prompt -i "-o, --opacity [$(IFS='|'; echo "${OPACITY_VARIANTS[*]}")]" + prompt -i "-c, --color [$(IFS='|'; echo "${COLOR_VARIANTS[*]}")]" + prompt -i "-a, --alt [$(IFS='|'; echo "${ALT_VARIANTS[*]}")|all]" + prompt -i "-t, --theme [$(IFS='|'; echo "${THEME_VARIANTS[*]}")|all]" + prompt -i "..." + echo + exit 0 else prompt -e "Could not locate theme... install theme first! \n" exit 0 @@ -43,7 +53,7 @@ pakitheme_gtk3() { rm -rf "$build_dir" mkdir -p "$build_dir/files" - cp -a "$theme_path/gtk-3.0/"* "$build_dir/files" + cp -a "$theme_path/gtk-3.0/"{gtk.css,gtk-dark.css,gtk.gresource} "$build_dir/files" mkdir -p "$build_dir/files/share/appdata" cat >"$build_dir/files/share/appdata/$gtk3_app_id.appdata.xml" < - + diff --git a/src/other/firefox/common/parts/icons.css b/src/other/firefox/common/parts/icons.css index df85a1dd..08f01a46 100644 --- a/src/other/firefox/common/parts/icons.css +++ b/src/other/firefox/common/parts/icons.css @@ -374,7 +374,7 @@ menu[disabled] > .menu-right { #downloads-button .toolbarbutton-icon { /* Downloads button / Glitch - it swaps to the default one anyway */ list-style-image: url("../icons/folder-download-symbolic.svg") !important; } -#downloads-button, #downloads-indicator-anchor { +#downloads-indicator-anchor { list-style-image: url("../icons/folder-download-symbolic.svg") !important; } @@ -746,7 +746,7 @@ treechildren::-moz-tree-image { #screenshot-button .toolbarbutton-icon, #scrollbutton-up .toolbarbutton-icon, #scrollbutton-down .toolbarbutton-icon, - #downloads-button, + #downloads-button .toolbarbutton-icon, #downloads-indicator-anchor, #tracking-protection-icon, #pageActionButton, diff --git a/tweaks.sh b/tweaks.sh index 3a09d5d3..2b8d5a40 100755 --- a/tweaks.sh +++ b/tweaks.sh @@ -25,9 +25,9 @@ usage() { helpify_title helpify "[GDM theme]" "options" ".................." "" helpify "-g, --gdm" "[default|x2]" "Install '${THEME_NAME}' theme for GDM (scaling: 100%/200%, default is 100%)" "Requires to run this shell as root" - helpify "-o, --opacity" "[$(IFS='|'; echo "${OPACITY_VARIANTS[*]}")]" "Set '${THEME_NAME}' GDM theme opacity variants" "Default is 'normal'" - helpify "-c, --color" "[$(IFS='|'; echo "${COLOR_VARIANTS[*]}")]" "Set '${THEME_NAME}' GDM and Dash to Dock theme color variants" "Default is 'light'" - helpify "-t, --theme" "[$(IFS='|'; echo "${THEME_VARIANTS[*]}")]" "Set '${THEME_NAME}' GDM theme accent color" "Default is BigSur-like theme" + helpify "-o, --opacity" "[$(IFS='|'; echo "${OPACITY_VARIANTS[*]}")]" "Set '${THEME_NAME}' GDM/Flatpak theme opacity variants" "Default is 'normal'" + helpify "-c, --color" "[$(IFS='|'; echo "${COLOR_VARIANTS[*]}")]" "Set '${THEME_NAME}' GDM/Flatpak and Dash to Dock theme color variants" "Default is 'light'" + helpify "-t, --theme" "[$(IFS='|'; echo "${THEME_VARIANTS[*]}")]" "Set '${THEME_NAME}' GDM/Flatpak theme accent color" "Default is BigSur-like theme" helpify "-N, --no-darken" "" "Don't darken '${THEME_NAME}' GDM theme background image" "" helpify "-n, --no-blur" "" "Don't blur '${THEME_NAME}' GDM theme background image" "" helpify "-b, --background" "[default|blank|IMAGE_PATH]" "Set '${THEME_NAME}' GDM theme background image" "Default is BigSur-like wallpaper" @@ -115,6 +115,7 @@ while [[ $# -gt 0 ]]; do fi; shift ;; -F|--flatpak) flatpak="true"; signal_exit + prompt -w "Without options it will only install default themes\n" if ! has_command flatpak; then prompt -e "'${1}' ERROR: There's no Flatpak installed in your system" @@ -173,11 +174,11 @@ while [[ $# -gt 0 ]]; do -P|--panel-size) check_param "${1}" "${1}" "${2}" "optional" "optional" "optional" && shift 2 || shift ;; -o|--opacity) - check_param "${1}" "${1}" "${2}" "must" "must" "must" "false" && shift 2 || shift ;; + check_param "${1}" "${1}" "${2}" "not-at-all" "must" "must" && shift 2 || shift ;; -c|--color) - check_param "${1}" "${1}" "${2}" "must" "must" "must" "false" && shift 2 || shift ;; + check_param "${1}" "${1}" "${2}" "not-at-all" "must" "must" && shift 2 || shift ;; -t|--theme) - check_param "${1}" "${1}" "${2}" "must" "must" "must" "false" && shift 2 || shift ;; + check_param "${1}" "${1}" "${2}" "not-at-all" "must" "must" && shift 2 || shift ;; *) prompt -e "ERROR: Unrecognized tweak option '${1}'." has_any_error="true"; shift ;; @@ -245,7 +246,7 @@ else if [[ "${flatpak}" == 'true' && "${gdm}" != 'true' ]]; then prompt -i "Connecting '${name}' themes to your Flatpak... \n" - connect_flatpak + customize_theme; avoid_variant_duplicates; connect_flatpak prompt -s "Done! '${name}' theme has been connected to your Flatpak. \n" fi