This commit is contained in:
vinceliuice 2024-08-31 22:32:50 +08:00
parent 7a4827bd1c
commit 5cccfb51cf
5 changed files with 86 additions and 27 deletions

View File

@ -207,13 +207,11 @@ Parameter: `--nautilus-style` `-N`
Example: `./install.sh -N mojave`
### <p align="center"> <b> Explore more customization features! </b> </p>
You can run `./install.sh -h` to explore more customization features we have
like changing panel opacity, theme opacity (normal and solid variant), window
control button variant, etc.
# Let's tweak!
Usage: `./tweaks.sh [OPTIONS...]`
@ -257,8 +255,13 @@ Usage: `./tweaks.sh [OPTIONS...]`
[Others]... options
-f, --firefox [default|monterey|alt|adaptive]
Install 'WhiteSur|Monterey|Alt|Adaptive' theme for Firefox and connect it to the current Firefox profiles. Default is WhiteSur
-f, --firefox [monterey|alt|adaptive] Options:
1. monterey [3+3,3+4,3+5,4+3,4+4,4+5,5+3,5+4,5+5] Topbar buttons number: 'a+b' a: left side buttons number, b: right side buttons number
2. alt Monterey alt version
3. adaptive Adaptive color version You need install adaptive-tab-bar-colour plugin first https://addons.mozilla.org/firefox/addon/adaptive-tab-bar-colour/
-e, --edit-firefox [default|monterey|alt|adaptive]
Edit 'WhiteSur' theme for Firefox settings and also connect the theme to the current Firefox profiles.

View File

@ -113,6 +113,9 @@ nautilus_style="${NAUTILUS_STYLE_VARIANTS[0]}"
background="blank"
compact="true"
colorscheme=""
firefoxtheme="$THEME_NAME"
left_button="3"
right_button="3"
#--Ambigous arguments checking and overriding default values--#
declare -A has_set=([-b]="false" [-s]="false" [-p]="false" [-P]="false" [-d]="false" [-n]="false" [-a]="false" [-o]="false" [-c]="false" [-i]="false" [-t]="false" [-N]="false")
@ -394,6 +397,14 @@ helpify() {
printf " ${c_blue}%s ${c_green}%s\n ${c_magenta}%s. ${c_cyan}%s\n\n${c_default}" "${1}" "${2}" "${3}" "${4}"
}
sec_title() {
printf " ${c_blue}%s ${c_green}%s ${c_magenta}%s\n\n" "${1}" "${2}" "${3}"
}
sec_helpify() {
printf " ${c_blue}%s ${c_green}%s ${c_magenta}%s ${c_cyan}%s\n\n${c_default}" "${1}" "${2}" "${3}" "${4}"
}
###############################################################################
# PARAMETERS #
###############################################################################

View File

@ -705,6 +705,9 @@ install_firefox_theme() {
else
udo cp -rf "${FIREFOX_SRC_DIR}"/userChrome-Monterey.css "${TARGET_DIR}"/userChrome.css
fi
sed -i "s/left_header_button_3/left_header_button_${left_button}/g" "${TARGET_DIR}"/userChrome.css
sed -i "s/right_header_button_3/right_header_button_${right_button}/g" "${TARGET_DIR}"/userChrome.css
fi
else
udo cp -rf "${FIREFOX_SRC_DIR}"/WhiteSur "${TARGET_DIR}"
@ -1010,22 +1013,20 @@ customize_theme() {
# values are taken from _variables.scss
show_panel_opacity_dialog() {
install_dialog_deps
dialogify panel_opacity "${THEME_NAME}" "Choose your panel opacity (Default is 15)" ${PANEL_OPACITY_VARIANTS[*]}
}
show_sidebar_size_dialog() {
install_dialog_deps
dialogify sidebar_size "${THEME_NAME}" "Choose your Nautilus minimum sidebar size (default is 200px)" ${SIDEBAR_SIZE_VARIANTS[*]}
}
show_nautilus_style_dialog() {
install_dialog_deps
dialogify nautilus_style "${THEME_NAME}" "Choose your Nautilus style (default is BigSur-like style)" ${NAUTILUS_STYLE_VARIANTS[*]}
}
show_needed_dialogs() {
install_dialog_deps
if [[ "${need_dialog["-p"]}" == "true" ]]; then show_panel_opacity_dialog; fi
if [[ "${need_dialog["-s"]}" == "true" ]]; then show_sidebar_size_dialog; fi
# if [[ "${need_dialog["-s"]}" == "true" ]]; then show_sidebar_size_dialog; fi
if [[ "${need_dialog["-N"]}" == "true" ]]; then show_nautilus_style_dialog; fi
}

View File

@ -19,7 +19,12 @@ Run `./tweaks.sh -f monterey`
### Tips about monterey options (Fix the urlbar attached tabs issue)
1. Remove all space separators on left of urlbar
2. Make sure how many buttons you put on side of urlbar an then run `./tweaks.sh -f monterey -e`
2. Make sure how many buttons on side of urlbar, a: left side buttons number(3-5), b: right side buttons number(3-5).
3. then run: `./tweaks.sh -f monterey a+b` for example: `./tweaks.sh -f monterey 5+5`
or you can edit the config file
1. run: `./tweaks.sh -f monterey -e`
```
/*--------------Configure your Monterey theme--------------
@ -39,7 +44,7 @@ Run `./tweaks.sh -f monterey`
```
3. Choose the right buttons number config then remove `/*` to enable it and add `/*` to disable the default one
2. Choose the right buttons number config then remove `/*` to enable it and add `/*` to disable the default one
### Manual installation

View File

@ -19,8 +19,6 @@ source "${REPO_DIR}/shell/lib-install.sh"
colors=("${COLOR_VARIANTS[@]}")
opacities=("${OPACITY_VARIANTS[@]}")
firefoxtheme=$THEME_NAME
usage() {
# Please specify their default value manually, some of them are come from _variables.scss
# You also have to check and update them regurally
@ -38,8 +36,12 @@ usage() {
helpify "-i, --icon" "[$(IFS='|'; echo "${ICON_VARIANTS[*]}")]" " Set '${THEME_NAME}' GDM (GNOME Shell) 'Activities' icon" "Default is 'standard'"
helpify "--nord, --nordcolor" "" " Install '${THEME_NAME}' Nord ColorScheme themes" ""
helpify "" "" "[Others].." "options"
helpify "-f, --firefox" "[default|monterey|alt|adaptive]" " Install '${THEME_NAME}|Monterey|Alt|Adaptive' theme for Firefox and connect it to the current Firefox profiles" "Default is ${THEME_NAME}"
helpify "" "" "[Others].." "options"
sec_title "-f, --firefox" " [monterey|alt|adaptive]" " Options:"
sec_helpify "1. monterey" " [3+3,3+4,3+5,4+3,4+4,4+5,5+3,5+4,5+5]" " Topbar buttons number: 'a+b'" " a: left side buttons number, b: right side buttons number"
sec_helpify "2. alt" " Monterey alt version" "" ""
sec_helpify "3. adaptive" " Adaptive color version" " You need install adaptive-tab-bar-colour plugin first" " https://addons.mozilla.org/firefox/addon/adaptive-tab-bar-colour/"
helpify "-e, --edit-firefox" "[default|monterey|alt|adaptive]" " Edit '${THEME_NAME}' theme for Firefox settings and also connect the theme to the current Firefox profiles" ""
helpify "-F, --flatpak" "Support options: [-o, -c, -t...]" " Connect '${THEME_NAME}' theme to Flatpak" "Without options will only install default themes"
@ -90,24 +92,63 @@ while [[ $# -gt 0 ]]; do
case "${variant}" in
default)
firefoxtheme="WhiteSur"
shift 1
;;
shift ;;
monterey)
firefoxtheme="Monterey"
theme_name="Monterey"
shift 1
;;
shift
for button in "${@}"; do
case "${button}" in
3+3)
left_button="3"
right_button="3"
shift ;;
3+4)
left_button="3"
right_button="4"
shift ;;
3+5)
left_button="3"
right_button="5"
shift ;;
4+3)
left_button="4"
right_button="3"
shift ;;
4+4)
left_button="4"
right_button="4"
shift ;;
4+5)
left_button="4"
right_button="5"
shift
;;
5+3)
left_button="5"
right_button="3"
shift ;;
5+4)
left_button="5"
right_button="4"
shift
;;
5+5)
left_button="5"
right_button="5"
shift ;;
esac
done
prompt -s "Left side topbar button number: $left_button, right side topbar button number: $right_button.\n" ;;
alt)
firefoxtheme="Alt"
theme_name="Monterey"
shift 1
;;
shift ;;
adaptive)
adaptive="true"
prompt -i "Firefox adaptive color version...\n"
prompt -w "You need install adaptive-tab-bar-colour plugin first: https://addons.mozilla.org/firefox/addon/adaptive-tab-bar-colour/\n"
shift 1
;;
shift ;;
esac
done
@ -145,12 +186,10 @@ while [[ $# -gt 0 ]]; do
for variant in "${@}"; do
case "${variant}" in
default)
shift 1
;;
shift ;;
x2)
scale="x2"
shift 1
;;
shift ;;
esac
done
@ -280,7 +319,7 @@ else
fi
if [[ "${gdm}" != 'true' ]]; then
prompt -w "FIREFOX: Please go to [Firefox menu] > [Customize...], and customize your Firefox to make it work. Move your 'new tab' button to the titlebar instead of tab-switcher."
prompt -w "FIREFOX: Please go to [Firefox menu] > [Customize...], and customize your Firefox to make it work. Move your 'new tab' button to the titlebar instead of tab-switcher. \n"
prompt -i "FIREFOX: Anyway, you can also edit 'userChrome.css' and 'customChrome.css' later in your Firefox profile directory. \n"
fi
fi