From df789826d87bdf913088a2b66d69071cb4a4be34 Mon Sep 17 00:00:00 2001 From: Vince Date: Mon, 24 May 2021 13:18:19 +0800 Subject: [PATCH] update --- README.md | 60 ++++++++++++++++++++++++++++++++++++++++++++++---- lib-core.sh | 2 +- lib-install.sh | 8 +++---- tweaks.sh | 6 ++--- 4 files changed, 64 insertions(+), 12 deletions(-) diff --git a/README.md b/README.md index 056aa00..0ac6b08 100644 --- a/README.md +++ b/README.md @@ -147,6 +147,58 @@ control button variant, etc. # Let's tweak! Usage: `./tweaks.sh [OPTIONS...]` +
Install OPTIONS + +```bash +-f, --firefox +# Install 'WhiteSur' theme for Firefox and connect it to the current Firefox profiles. + +-e, --edit-firefox +# Edit 'WhiteSur' theme for Firefox settings and also connect the theme to the current Firefox profiles. + +-F, --flatpak +# Connect 'WhiteSur' theme to Flatpak. + +-s, --snap +# Connect 'WhiteSur' theme the currently installed snap apps. + +-g, --gdm +# Install 'WhiteSur' theme for GDM. Requires to run this shell as root + +-d, --dash-to-dock +# Install 'WhiteSur' theme for Dash to Dock and connect it to the current Dash to Dock installation(s). + +-N, --no-darken +# Don't darken 'WhiteSur' GDM theme background image. + +-n, --no-blur +# Don't blur 'WhiteSur' GDM theme background image. + +-b, --background [default|blank|IMAGE_PATH] +# Set 'WhiteSur' GDM theme background image. Default is BigSur-like wallpaper + +-o, --opacity [normal|solid] +# Set 'WhiteSur' GDM theme opacity variants. Default is 'normal' + +-c, --color [light|dark] +# Set 'WhiteSur' GDM and Dash to Dock theme color variants. Default is 'light' + +-t, --theme [default|blue|purple|pink|red|orange|yellow|green|grey] +# Set 'WhiteSur' GDM theme accent color. Default is BigSur-like theme + +-p, --panel [default|30|45|60|75] +# Set 'WhiteSur' GDM (GNOME Shell) theme panel transparency. Default is 15% + +-i, --icon [standard|simple|gnome|ubuntu|arch|manjaro|fedora|debian|void] +# Set 'WhiteSur' GDM (GNOME Shell) 'Activities' icon. Default is 'standard' + +-r, --remove, --revert +# Revert to the original themes, do the opposite things of install and connect. + +-h, --help +# Show this help. +``` + ## There's more themes you can try! ###

Install and edit Firefox theme

@@ -199,14 +251,14 @@ sudo ./tweaks.sh -g -b default # use the default background sudo ./tweaks.sh -g -b blank # make it blank ``` -#### Make the background darker -Parameter: `--darken` `-D` +#### Make the background not darker (normal) +Parameter: `--no_darken` `-N` Example: ```bash -sudo ./tweaks.sh -g -D # darken the default background -sudo ./tweaks.sh -g -D -b "wallpapers/snow.jpg" # darken the custom background +sudo ./tweaks.sh -g -N # darken the default background +sudo ./tweaks.sh -g -N -b "wallpapers/snow.jpg" # darken the custom background ``` #### Don't blur the background diff --git a/lib-core.sh b/lib-core.sh index b10e1a0..9285c9b 100755 --- a/lib-core.sh +++ b/lib-core.sh @@ -100,7 +100,7 @@ need_help="false" uninstall="false" interactive="false" -darken="true" +no_darken="false" no_blur="false" firefox="false" diff --git a/lib-install.sh b/lib-install.sh index 09bc381..55d3a85 100755 --- a/lib-install.sh +++ b/lib-install.sh @@ -126,17 +126,17 @@ install_beggy() { local CONVERT_OPT="" [[ "${no_blur}" == "false" ]] && CONVERT_OPT+=" -scale 1280x -blur 0x50 " - [[ "${darken}" == "true" ]] && CONVERT_OPT+=" -fill black -colorize 45% " + [[ "${no_darken}" == "false" ]] && CONVERT_OPT+=" -fill black -colorize 45% " case "${background}" in blank) cp -r "${THEME_SRC_DIR}/assets/gnome-shell/common-assets/background-blank.png" "${WHITESUR_TMP_DIR}/beggy.png" ;; default) - if [[ "${no_blur}" == "false" && "${darken}" == "false" ]]; then + if [[ "${no_blur}" == "false" && "${no_darken}" == "true" ]]; then cp -r "${THEME_SRC_DIR}/assets/gnome-shell/common-assets/background-blur.png" "${WHITESUR_TMP_DIR}/beggy.png" - elif [[ "${no_blur}" == "false" && "${darken}" == "true" ]]; then + elif [[ "${no_blur}" == "false" && "${no_darken}" == "false" ]]; then cp -r "${THEME_SRC_DIR}/assets/gnome-shell/common-assets/background-blur-darken.png" "${WHITESUR_TMP_DIR}/beggy.png" - elif [[ "${no_blur}" == "true" && "${darken}" == "false" ]]; then + elif [[ "${no_blur}" == "true" && "${no_darken}" == "true" ]]; then cp -r "${THEME_SRC_DIR}/assets/gnome-shell/common-assets/background-default.png" "${WHITESUR_TMP_DIR}/beggy.png" else cp -r "${THEME_SRC_DIR}/assets/gnome-shell/common-assets/background-darken.png" "${WHITESUR_TMP_DIR}/beggy.png" diff --git a/tweaks.sh b/tweaks.sh index 5ceff99..8e10955 100755 --- a/tweaks.sh +++ b/tweaks.sh @@ -25,7 +25,7 @@ usage() { helpify "-s, --snap" "" "Connect '${THEME_NAME}' theme the currently installed snap apps" "" helpify "-g, --gdm" "" "Install '${THEME_NAME}' theme for GDM" "Requires to run this shell as root" helpify "-d, --dash-to-dock" "" "Install '${THEME_NAME}' theme for Dash to Dock and connect it to the current Dash to Dock installation(s)" "" - helpify "-D, --darken" "" "Darken '${THEME_NAME}' GDM theme background image" "" + 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" helpify "-o, --opacity" "[$(IFS='|'; echo "${OPACITY_VARIANTS[*]}")]" "Set '${THEME_NAME}' GDM theme opacity variants" "Default is 'normal'" @@ -110,8 +110,8 @@ while [[ $# -gt 0 ]]; do prompt -e "'${1}' ERROR: There's no Dash to Dock installed in your system" has_any_error="true" fi; shift ;; - -D|--darken) - darken="true"; shift ;; + -N|--no-darken) + no_darken="true"; shift ;; -n|--no-blur) no_blur="true"; shift ;; # Parameters that require value, single use