diff --git a/README.md b/README.md index df1797d7..36196a27 100644 --- a/README.md +++ b/README.md @@ -257,13 +257,15 @@ Usage: `./tweaks.sh [OPTIONS...]` [Others]... options - -f, --firefox [monterey|alt|adaptive] Options: + -f, --firefox [(monterey/flat)|alt|adaptive] Without options default WhiteSur theme will install... 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 + 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 + 2. flat Monterey alt version Flat round tabs... - 3. adaptive Adaptive color version You need install adaptive-tab-bar-colour plugin first https://addons.mozilla.org/firefox/addon/adaptive-tab-bar-colour/ + 3. alt Alt windows button version Alt window button style like gtk theme + + 4. 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. diff --git a/shell/lib-core.sh b/shell/lib-core.sh index fc29321b..cd384db8 100755 --- a/shell/lib-core.sh +++ b/shell/lib-core.sh @@ -113,9 +113,6 @@ 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") @@ -398,7 +395,7 @@ helpify() { } sec_title() { - printf " ${c_blue}%s ${c_green}%s ${c_magenta}%s\n\n" "${1}" "${2}" "${3}" + printf " ${c_blue}%s ${c_green}%s ${c_magenta}%s ${c_cyan}%s\n\n${c_default}" "${1}" "${2}" "${3}" "${4}" } sec_helpify() { diff --git a/shell/lib-install.sh b/shell/lib-install.sh index b0139a5a..09c146f2 100755 --- a/shell/lib-install.sh +++ b/shell/lib-install.sh @@ -680,48 +680,26 @@ install_firefox_theme() { udo mkdir -p "${TARGET_DIR}" udo cp -rf "${FIREFOX_SRC_DIR}"/customChrome.css "${TARGET_DIR}" - if [[ "${theme_name}" == 'Monterey' ]]; then - udo cp -rf "${FIREFOX_SRC_DIR}"/Monterey "${TARGET_DIR}" - udo cp -rf "${FIREFOX_SRC_DIR}"/common/{icons,titlebuttons,pages} "${TARGET_DIR}"/Monterey - udo cp -rf "${FIREFOX_SRC_DIR}"/common/*.css "${TARGET_DIR}"/Monterey - udo cp -rf "${FIREFOX_SRC_DIR}"/common/parts/*.css "${TARGET_DIR}"/Monterey/parts + mkdir -p "${TARGET_DIR}" + cp -rf "${FIREFOX_SRC_DIR}/${theme_name}" "${TARGET_DIR}" + [[ -f "${TARGET_DIR}"/customChrome.css ]] && mv "${TARGET_DIR}"/customChrome.css "${TARGET_DIR}"/customChrome.css.bak + cp -rf "${FIREFOX_SRC_DIR}"/customChrome.css "${TARGET_DIR}" + cp -rf "${FIREFOX_SRC_DIR}"/common/{icons,titlebuttons,pages} "${TARGET_DIR}/${theme_name}" + cp -rf "${FIREFOX_SRC_DIR}"/common/*.css "${TARGET_DIR}/${theme_name}" + cp -rf "${FIREFOX_SRC_DIR}"/common/parts/*.css "${TARGET_DIR}/${theme_name}"/parts + [[ -f "${TARGET_DIR}"/userChrome.css ]] && mv "${TARGET_DIR}"/userChrome.css "${TARGET_DIR}"/userChrome.css.bak + cp -rf "${FIREFOX_SRC_DIR}"/userChrome-"${theme_name}${adaptive}".css "${TARGET_DIR}"/userChrome.css + [[ -f "${TARGET_DIR}"/userContent.css ]] && mv "${TARGET_DIR}"/userContent.css "${TARGET_DIR}"/userContent.css.bak + cp -rf "${FIREFOX_SRC_DIR}"/userContent-"${theme_name}${adaptive}".css "${TARGET_DIR}"/userContent.css - if [[ "${adaptive}" == 'true' ]]; then - udo cp -rf "${FIREFOX_SRC_DIR}"/userContent-Monterey-adaptive.css "${TARGET_DIR}"/userContent.css - else - udo cp -rf "${FIREFOX_SRC_DIR}"/userContent-Monterey.css "${TARGET_DIR}"/userContent.css - fi + if [[ "${firefoxtheme}" == 'Flat' && "${theme_name}" == 'Monterey' ]]; then + cp -rf "${FIREFOX_SRC_DIR}"/userChrome-Monterey-alt"${adaptive}".css "${TARGET_DIR}"/userChrome.css + cp -rf "${FIREFOX_SRC_DIR}"/WhiteSur/parts/headerbar-urlbar.css "${TARGET_DIR}"/Monterey/parts/headerbar-urlbar-alt.css + fi - if [[ "${firefoxtheme}" == 'Alt' ]]; then - if [[ "${adaptive}" == 'true' ]]; then - udo cp -rf "${FIREFOX_SRC_DIR}"/userChrome-Monterey-alt-adaptive.css "${TARGET_DIR}"/userChrome.css - else - udo cp -rf "${FIREFOX_SRC_DIR}"/userChrome-Monterey-alt.css "${TARGET_DIR}"/userChrome.css - fi - udo cp -rf "${FIREFOX_SRC_DIR}"/WhiteSur/parts/headerbar-urlbar.css "${TARGET_DIR}"/Monterey/parts/headerbar-urlbar-alt.css - else - if [[ "${adaptive}" == 'true' ]]; then - udo cp -rf "${FIREFOX_SRC_DIR}"/userChrome-Monterey-adaptive.css "${TARGET_DIR}"/userChrome.css - 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}" - udo cp -rf "${FIREFOX_SRC_DIR}"/common/{icons,titlebuttons,pages} "${TARGET_DIR}"/WhiteSur - udo cp -rf "${FIREFOX_SRC_DIR}"/common/*.css "${TARGET_DIR}"/WhiteSur - udo cp -rf "${FIREFOX_SRC_DIR}"/common/parts/*.css "${TARGET_DIR}"/WhiteSur/parts - - if [[ "${adaptive}" == 'true' ]]; then - udo cp -rf "${FIREFOX_SRC_DIR}"/userChrome-WhiteSur-adaptive.css "${TARGET_DIR}"/userChrome.css - udo cp -rf "${FIREFOX_SRC_DIR}"/userContent-WhiteSur-adaptive.css "${TARGET_DIR}"/userContent.css - else - udo cp -rf "${FIREFOX_SRC_DIR}"/userChrome-WhiteSur.css "${TARGET_DIR}"/userChrome.css - udo cp -rf "${FIREFOX_SRC_DIR}"/userContent-WhiteSur.css "${TARGET_DIR}"/userContent.css - fi + if [[ "${window}" == "alt" ]]; then + sed -i "s|titlebutton-light|titlebutton-light-alt|" "${TARGET_DIR}/${theme_name}"/theme*.css + sed -i "s|titlebutton-dark|titlebutton-dark-alt|" "${TARGET_DIR}/${theme_name}"/theme*.css fi config_firefox diff --git a/src/assets/gtk/windows-assets/windows-assets.svg b/src/assets/gtk/windows-assets/windows-assets.svg index 7ab5f787..e9a921b7 100644 --- a/src/assets/gtk/windows-assets/windows-assets.svg +++ b/src/assets/gtk/windows-assets/windows-assets.svg @@ -2,25 +2,21 @@ + inkscape:version="1.3.2 (091e20ef0f, 2023-11-25)" + sodipodi:docname="windows-assets.svg" + xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape" + xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd" + xmlns="http://www.w3.org/2000/svg" + xmlns:svg="http://www.w3.org/2000/svg"> + inkscape:swatch="gradient"> + inkscape:swatch="gradient"> + inkscape:swatch="solid"> + inkscape:swatch="gradient"> + inkscape:swatch="solid"> + inkscape:swatch="gradient"> + inkscape:swatch="solid"> + inkscape:swatch="gradient"> + inkscape:swatch="solid"> + inkscape:swatch="solid"> + inkscape:object-paths="false" + inkscape:deskcolor="#d1d1d1"> + originy="-1062" + spacingy="1" + spacingx="1" + units="px" /> - - - - image/svg+xml - - - - - - - - - + + + + + + + + + + diff --git a/src/other/firefox/common/titlebuttons/titlebutton-close-active-dark-alt.svg b/src/other/firefox/common/titlebuttons/titlebutton-close-active-dark-alt.svg new file mode 100644 index 00000000..d1538392 --- /dev/null +++ b/src/other/firefox/common/titlebuttons/titlebutton-close-active-dark-alt.svg @@ -0,0 +1,12 @@ + + + + + + + + + + + + diff --git a/src/other/firefox/common/titlebuttons/titlebutton-close-backdrop-alt.svg b/src/other/firefox/common/titlebuttons/titlebutton-close-backdrop-alt.svg new file mode 100644 index 00000000..06975417 --- /dev/null +++ b/src/other/firefox/common/titlebuttons/titlebutton-close-backdrop-alt.svg @@ -0,0 +1,12 @@ + + + + + + + + + + + + diff --git a/src/other/firefox/common/titlebuttons/titlebutton-close-backdrop-dark-alt.svg b/src/other/firefox/common/titlebuttons/titlebutton-close-backdrop-dark-alt.svg new file mode 100644 index 00000000..4284aec4 --- /dev/null +++ b/src/other/firefox/common/titlebuttons/titlebutton-close-backdrop-dark-alt.svg @@ -0,0 +1,11 @@ + + + + + + + + + + + diff --git a/src/other/firefox/common/titlebuttons/titlebutton-close-hover-alt.svg b/src/other/firefox/common/titlebuttons/titlebutton-close-hover-alt.svg new file mode 100644 index 00000000..95e2a156 --- /dev/null +++ b/src/other/firefox/common/titlebuttons/titlebutton-close-hover-alt.svg @@ -0,0 +1,12 @@ + + + + + + + + + + + + diff --git a/src/other/firefox/common/titlebuttons/titlebutton-close-hover-dark-alt.svg b/src/other/firefox/common/titlebuttons/titlebutton-close-hover-dark-alt.svg new file mode 100644 index 00000000..38f74bf2 --- /dev/null +++ b/src/other/firefox/common/titlebuttons/titlebutton-close-hover-dark-alt.svg @@ -0,0 +1,11 @@ + + + + + + + + + + + diff --git a/src/other/firefox/common/titlebuttons/titlebutton-maximize-active-alt.svg b/src/other/firefox/common/titlebuttons/titlebutton-maximize-active-alt.svg new file mode 100644 index 00000000..69f1f362 --- /dev/null +++ b/src/other/firefox/common/titlebuttons/titlebutton-maximize-active-alt.svg @@ -0,0 +1,11 @@ + + + + + + + + + + + diff --git a/src/other/firefox/common/titlebuttons/titlebutton-maximize-active-dark-alt.svg b/src/other/firefox/common/titlebuttons/titlebutton-maximize-active-dark-alt.svg new file mode 100644 index 00000000..382c36c8 --- /dev/null +++ b/src/other/firefox/common/titlebuttons/titlebutton-maximize-active-dark-alt.svg @@ -0,0 +1,12 @@ + + + + + + + + + + + + diff --git a/src/other/firefox/common/titlebuttons/titlebutton-maximize-hover-alt.svg b/src/other/firefox/common/titlebuttons/titlebutton-maximize-hover-alt.svg new file mode 100644 index 00000000..fe253a88 --- /dev/null +++ b/src/other/firefox/common/titlebuttons/titlebutton-maximize-hover-alt.svg @@ -0,0 +1,12 @@ + + + + + + + + + + + + diff --git a/src/other/firefox/common/titlebuttons/titlebutton-maximize-hover-dark-alt.svg b/src/other/firefox/common/titlebuttons/titlebutton-maximize-hover-dark-alt.svg new file mode 100644 index 00000000..64d0fcba --- /dev/null +++ b/src/other/firefox/common/titlebuttons/titlebutton-maximize-hover-dark-alt.svg @@ -0,0 +1,11 @@ + + + + + + + + + + + diff --git a/src/other/firefox/common/titlebuttons/titlebutton-unmaximize-active-alt.svg b/src/other/firefox/common/titlebuttons/titlebutton-unmaximize-active-alt.svg new file mode 100644 index 00000000..69f1f362 --- /dev/null +++ b/src/other/firefox/common/titlebuttons/titlebutton-unmaximize-active-alt.svg @@ -0,0 +1,11 @@ + + + + + + + + + + + diff --git a/src/other/firefox/common/titlebuttons/titlebutton-unmaximize-active-dark-alt.svg b/src/other/firefox/common/titlebuttons/titlebutton-unmaximize-active-dark-alt.svg new file mode 100644 index 00000000..382c36c8 --- /dev/null +++ b/src/other/firefox/common/titlebuttons/titlebutton-unmaximize-active-dark-alt.svg @@ -0,0 +1,12 @@ + + + + + + + + + + + + diff --git a/src/other/firefox/common/titlebuttons/titlebutton-unmaximize-hover-alt.svg b/src/other/firefox/common/titlebuttons/titlebutton-unmaximize-hover-alt.svg new file mode 100644 index 00000000..fe253a88 --- /dev/null +++ b/src/other/firefox/common/titlebuttons/titlebutton-unmaximize-hover-alt.svg @@ -0,0 +1,12 @@ + + + + + + + + + + + + diff --git a/src/other/firefox/common/titlebuttons/titlebutton-unmaximize-hover-dark-alt.svg b/src/other/firefox/common/titlebuttons/titlebutton-unmaximize-hover-dark-alt.svg new file mode 100644 index 00000000..64d0fcba --- /dev/null +++ b/src/other/firefox/common/titlebuttons/titlebutton-unmaximize-hover-dark-alt.svg @@ -0,0 +1,11 @@ + + + + + + + + + + + diff --git a/tweaks.sh b/tweaks.sh index a4beba72..1d0cda97 100755 --- a/tweaks.sh +++ b/tweaks.sh @@ -19,6 +19,13 @@ source "${REPO_DIR}/shell/lib-install.sh" colors=("${COLOR_VARIANTS[@]}") opacities=("${OPACITY_VARIANTS[@]}") +# Firefox values +adaptive='' +theme_name="$THEME_NAME" +firefoxtheme="$THEME_NAME" +left_button="3" +right_button="3" + usage() { # Please specify their default value manually, some of them are come from _variables.scss # You also have to check and update them regurally @@ -37,10 +44,11 @@ usage() { helpify "--nord, --nordcolor" "" " Install '${THEME_NAME}' Nord ColorScheme themes" "" 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/" + sec_title "-f, --firefox" " [(monterey/flat)|alt|adaptive]" " Without options default WhiteSur theme will install..." " 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. flat" " Monterey alt version" "" " Flat round tabs..." + sec_helpify "3. alt" " Alt windows button version" "" " Alt window button style like gtk theme" + sec_helpify "4. 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" "" @@ -147,12 +155,16 @@ while [[ $# -gt 0 ]]; do esac done prompt -s "Left side topbar button number: $left_button, right side topbar button number: $right_button.\n" ;; - alt) - firefoxtheme="Alt" + flat) + firefoxtheme="Flat" theme_name="Monterey" shift ;; + alt) + window="alt" + prompt -i "Alt windnows button version...\n" + shift ;; adaptive) - adaptive="true" + adaptive="-adaptive" 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 ;;