From 27cc33b17be214e202d532c0416adc0bfba65580 Mon Sep 17 00:00:00 2001 From: fliegerjohn Date: Sun, 19 Nov 2023 23:07:05 +0100 Subject: [PATCH 01/11] Add deploy-script --- fenix-fox.sh | 58 +++++++++++++++++++++++++++++++++++++++++++++++++++- 1 file changed, 57 insertions(+), 1 deletion(-) diff --git a/fenix-fox.sh b/fenix-fox.sh index 6c11249..a5627c3 100755 --- a/fenix-fox.sh +++ b/fenix-fox.sh @@ -1,3 +1,59 @@ #!/bin/sh -# +# +## Variables +# +# firefox dirs +firefox_root="~/.mozilla/firefox" # Not in use jet because of a not known issue... +firefox_profiledir="*.default-release" +installdir=`find ~/.mozilla/firefox -name $firefox_profiledir` + +# git repo +fenix_fox="https://git.datenkastl.org/pmOS-tweaks/fenix-fox.git" +clonedir="/tmp/fenix-fox" + +# +## Funktions +# +enable_profile_customizations() { + echo "Enable *toolkit.legacyUserProfileCustomizations.stylesheets* with user.js" + if [ ! -e "${installdir}/user.js" ]; then + echo 'user_pref("toolkit.legacyUserProfileCustomizations.stylesheets", true);' \ + > $installdir/user.js + elif grep -q toolkit.legacyUserProfileCustomizations.stylesheets $installdir/user.js + then + echo "user.js with *toolkit.legacyUserProfileCustomizations.stylesheets* already there" + echo "Do nothing! Please enable manually if not enabled!" + else + echo "Enable *toolkit.legacyUserProfileCustomizations.stylesheets* with user.js" + echo 'user_pref("toolkit.legacyUserProfileCustomizations.stylesheets", true);' \ + >> $installdir/user.js + fi +} + +deploy_fenix_fox() { + echo "Copy files in place and enable fenix-fox" + cp -r src/userChrome $installdir/chrome + cp src/userChrome/userChrome-fenix_fox.css $installdir/chrome/ +} + +# Clonerepo not in use +clonerepo() { + echo "clone fenix-fox to /tmp" + mkdir -p $clonedir + git clone $fenix_fox $clonedir +} + +# +## Main +# + +# Setup Profile Customizations in user.js +enable_profile_customizations + +# Copy files to profile +deploy_fenix_fox + +# finish +echo "Finished! Restart firefox and enjoy your new design!" + From 95fb50c32218bf96a95cbc6b5cadae3d4265f919 Mon Sep 17 00:00:00 2001 From: fliegerjohn Date: Mon, 20 Nov 2023 12:55:03 +0100 Subject: [PATCH 02/11] Fix issue with variables --- .fenix-fox.sh.swp | Bin 0 -> 12288 bytes fenix-fox.sh | 4 ++-- 2 files changed, 2 insertions(+), 2 deletions(-) create mode 100644 .fenix-fox.sh.swp diff --git a/.fenix-fox.sh.swp b/.fenix-fox.sh.swp new file mode 100644 index 0000000000000000000000000000000000000000..3ae0a14ceac77594ad7a375962915606d270dcc8 GIT binary patch literal 12288 zcmeI2&2Jk;7>D2VP~nyU0&yR&BQ=fK-B6?oh};9Ar5v0Fs`gTlJMoU~iFap~-B~40 zRN%;wD}O}~T;L4if`mX-RdJ>&5?4O1@SEMWouoA?6{=L2l^*TKeE6MbW?m`EY^`2> zyTe`!RteX0L^m&96JIQD(7mULwzcAB$dxVnyUPrv8jbzkGpl7UbE|$h=`h^P^dRF& zB1KlHL6|0&F8gLj@KGN2g_65|U+>PIf_yl)Pgmd!I0Fx1pfG*^)kS*c%**8_ZFx=h z!t+-iqM@te3^)VMfHU9>I0MdrGvEw31OF8RCS9P9FqmWYfY$2!!jXIZ>Tb?}GvEw3 z1I~am;0!ne&VV!E3^)VMfHUv}8sHJp@dnX}69^vv|DXK*|HrdLzk^@FJ#ZJ?1~y&VV!E z3^)VMfHU9>{0|L?-cU2|f>bgeim1un6}jP=VSSkioX2EbMNFt|J!WHFWK4-27KvOA zRMVptYT0%~kw{}b?v}?myJ&`@b)Ak;9*dkA&C*QUXCk5aRxG;pd$(8QMkjKQ8>v-} zW|xI2Qih|VwmMrsRLrDeMJ}>nJ11&UtHnB8Dm>8*Y7C@dy;v*3mZo8_rSeN8Ge(VM zWbb}D`$&yy^i{Lz8B`l@Xp+>UvLF+wUOvtC?U-!;_MIth>S)Rz@1-oydZ7(&eVFM) z9C-An;RL-rXG>DSa2z9;uvgWk2HN}CkuDxka}w|Yw@{MCyeI03vU1sUB;I`!Qx3%H z>Puoru5;%O{p7@Sqq20$zGL1*f7vry$0KQiSPXb?d<6ydgdLu*AU9*o|4;~%doMAQ z72@>TDfS-KU3%xs#lTh`p}!TjBh7HK96Xqbb207s&2oltLV3_+o3Y@zz#=Z)BwQ7+ zKW4IDPGa>r!fKubRgb&s|ItF@aVB^)W@d=hf}U|#HbVU70LzE@A7G9BV})~O=kd)N z!oS9v%oogC+Mg}s8|7lhru5kRYj(_btYupH7w5N{r#X3}+MYHcTqxA2P9;=rU+lBC zXSeh0Xt_tzE!p;l#-#b{VTk+@MBE59;< Date: Mon, 20 Nov 2023 12:59:20 +0100 Subject: [PATCH 03/11] Move chrome if there --- fenix-fox.sh | 3 +++ 1 file changed, 3 insertions(+) diff --git a/fenix-fox.sh b/fenix-fox.sh index 72dbf85..accaab8 100755 --- a/fenix-fox.sh +++ b/fenix-fox.sh @@ -33,6 +33,9 @@ enable_profile_customizations() { deploy_fenix_fox() { echo "Copy files in place and enable fenix-fox" + if [ -d "${installdir}/chrome" ]; then + mv $installdir/chrome $installdir/chrome.original + fi cp -r src/userChrome $installdir/chrome cp src/userChrome/userChrome-fenix_fox.css $installdir/chrome/ } From 8cd448564f1e7193e20c72f34902751fc9031d99 Mon Sep 17 00:00:00 2001 From: fliegerjohn Date: Mon, 20 Nov 2023 23:22:25 +0100 Subject: [PATCH 04/11] Add symbolic link instead of copying css file to userChrome.css --- .fenix-fox.sh.swp | Bin 12288 -> 0 bytes fenix-fox.sh | 3 ++- 2 files changed, 2 insertions(+), 1 deletion(-) delete mode 100644 .fenix-fox.sh.swp diff --git a/.fenix-fox.sh.swp b/.fenix-fox.sh.swp deleted file mode 100644 index 3ae0a14ceac77594ad7a375962915606d270dcc8..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 12288 zcmeI2&2Jk;7>D2VP~nyU0&yR&BQ=fK-B6?oh};9Ar5v0Fs`gTlJMoU~iFap~-B~40 zRN%;wD}O}~T;L4if`mX-RdJ>&5?4O1@SEMWouoA?6{=L2l^*TKeE6MbW?m`EY^`2> zyTe`!RteX0L^m&96JIQD(7mULwzcAB$dxVnyUPrv8jbzkGpl7UbE|$h=`h^P^dRF& zB1KlHL6|0&F8gLj@KGN2g_65|U+>PIf_yl)Pgmd!I0Fx1pfG*^)kS*c%**8_ZFx=h z!t+-iqM@te3^)VMfHU9>I0MdrGvEw31OF8RCS9P9FqmWYfY$2!!jXIZ>Tb?}GvEw3 z1I~am;0!ne&VV!E3^)VMfHUv}8sHJp@dnX}69^vv|DXK*|HrdLzk^@FJ#ZJ?1~y&VV!E z3^)VMfHU9>{0|L?-cU2|f>bgeim1un6}jP=VSSkioX2EbMNFt|J!WHFWK4-27KvOA zRMVptYT0%~kw{}b?v}?myJ&`@b)Ak;9*dkA&C*QUXCk5aRxG;pd$(8QMkjKQ8>v-} zW|xI2Qih|VwmMrsRLrDeMJ}>nJ11&UtHnB8Dm>8*Y7C@dy;v*3mZo8_rSeN8Ge(VM zWbb}D`$&yy^i{Lz8B`l@Xp+>UvLF+wUOvtC?U-!;_MIth>S)Rz@1-oydZ7(&eVFM) z9C-An;RL-rXG>DSa2z9;uvgWk2HN}CkuDxka}w|Yw@{MCyeI03vU1sUB;I`!Qx3%H z>Puoru5;%O{p7@Sqq20$zGL1*f7vry$0KQiSPXb?d<6ydgdLu*AU9*o|4;~%doMAQ z72@>TDfS-KU3%xs#lTh`p}!TjBh7HK96Xqbb207s&2oltLV3_+o3Y@zz#=Z)BwQ7+ zKW4IDPGa>r!fKubRgb&s|ItF@aVB^)W@d=hf}U|#HbVU70LzE@A7G9BV})~O=kd)N z!oS9v%oogC+Mg}s8|7lhru5kRYj(_btYupH7w5N{r#X3}+MYHcTqxA2P9;=rU+lBC zXSeh0Xt_tzE!p;l#-#b{VTk+@MBE59;< Date: Wed, 22 Nov 2023 21:34:38 +0100 Subject: [PATCH 05/11] Delete not needed files --- src/userChrome/userChrome.css | 24 - src/userChrome/userContent.css | 816 --------------------------------- 2 files changed, 840 deletions(-) delete mode 100644 src/userChrome/userChrome.css delete mode 100644 src/userChrome/userContent.css diff --git a/src/userChrome/userChrome.css b/src/userChrome/userChrome.css deleted file mode 100644 index 127325e..0000000 --- a/src/userChrome/userChrome.css +++ /dev/null @@ -1,24 +0,0 @@ -/* Copyright 2023 user0 - * SPDX-License-Identifier: MPL-2.0 */ - -/* Source files available here: - https://gitlab.com/postmarketOS/mobile-config-firefox/-/archive/master/mobile-config-firefox-master.zip - https://github.com/MrOtherGuy/firefox-csshacks/tree/master/chrome/ - https://forums.puri.sm/t/mobile-friendly-firefox-customizations-for-librem-5/20313 -*/ - -/* -@import "fenix_one-alt.css"; -*/ -@import "fenix_one.css"; -/* -@import "dynamic_popups.css"; - -@import "dynamic_popups_plus.css"; - -@import "dynamic_popups_max.css"; -*/ -@import "dynamic_popups_pro.css"; -/* -@import "dynamic_popups_pro_max.css"; -*/ diff --git a/src/userChrome/userContent.css b/src/userChrome/userContent.css deleted file mode 100644 index 50cf2db..0000000 --- a/src/userChrome/userContent.css +++ /dev/null @@ -1,816 +0,0 @@ -/* Copyright 2023 user0 - * SPDX-License-Identifier: MPL-2.0 */ - -@-moz-document -regexp("^(about:).*") { - - /* Fenix Colors */ - :root { - --addon-card-background: rgba(171,113,255,0.1) !important; - --brand-color-accent: rgb(80,54,132) !important; - --brand-color-accent-active: rgb(80,54,132) !important; - --brand-color-accent-hover: rgb(80,54,132) !important; - --color-canvas: rgb(167,111,250) !important; - --card-outline-color: rgb(171,113,255) !important; - --card-shadow: var(--shadow-10) !important; - --card-shadow-hover: var(--card-shadow), 0 0 0 5px var(--card-outline-color) !important; - --checkbox-border-color: white !important; - --checkbox-checked-active-bgcolor: var(--in-content-box-background-active) !important; - --checkbox-checked-bgcolor: var(--in-content-box-border-color) !important; - --checkbox-checked-border-color: var(--in-content-box-border-color) !important; - --checkbox-checked-color: var(--in-content-box-text-color) !important; - --checkbox-checked-hover-bgcolor: var(--in-content-box-background-hover) !important; - --checkbox-unchecked-active-bgcolor: var(--in-content-box-background-active) !important; - --checkbox-unchecked-bgcolor: var(--in-content-box-background) !important; - --checkbox-unchecked-hover-bgcolor: var(--in-content-box-background-hover) !important; - --dialog-warning-text-color: white !important; - --in-content-accent-color: rgb(171,113,255) !important; - --in-content-accent-color-active: rgb(203,158,255) !important; - --in-content-border-color: rgb(171,113,255) !important; - --in-content-border-active: rgb(203,158,255) !important; - --in-content-border-active-shadow: rgb(203,158,255) !important; - --in-content-border-hover: rgb(203,158,255) !important; - --in-content-border-invalid: rgb(171,113,255) !important; - --in-content-box-background: rgb(41,29,79) !important; - --in-content-box-background-active: rgb(203,158,255) !important; - --in-content-box-background-hover: rgb(203,158,255) !important; - --in-content-box-background-odd: var(--in-content-box-info-background) !important; - --in-content-box-border-color: rgb(171,113,255) !important; - --in-content-box-text-color: white !important; - --in-content-box-info-background: rgba(171,113,255,0.2) !important; - --in-content-button-background: rgb(171,113,255) !important; - --in-content-button-background-active: rgb(203,158,255) !important; - --in-content-button-background-hover: rgb(203,158,255) !important; - --in-content-button-border-color: rgb(171,113,255) !important; - --in-content-button-border-color-active: rgb(203,158,255) !important; - --in-content-button-border-color-hover: rgb(203,158,255) !important; - --in-content-button-text-color: white !important; - --in-content-button-text-color-active: white !important; - --in-content-button-text-color-hover: white !important; - --in-content-category-background: rgb(41,29,79) !important; - --in-content-category-background-hover: rgb(171,113,255) !important; - --in-content-category-background-selected: rgb(171,113,255) !important; - --in-content-category-background-selected-hover: rgb(171,113,255) !important; - --in-content-category-text: white !important; - --in-content-category-text-selected: white !important; - --in-content-danger-button-background: darkred !important; - --in-content-danger-button-background-active: red !important; - --in-content-danger-button-background-hover: red !important; - --in-content-deemphasized-text: lightgray !important; - --in-content-error-text-color: white !important; - --in-content-focus-outline-color: rgb(171,113,255) !important; - --in-content-icon-color: white !important; - --in-content-item-hover: rgb(203,158,255) !important; - --in-content-item-hover-text: white !important; - --in-content-item-selected: rgb(203,158,255) !important; - --in-content-item-selected-text: white !important; - --in-content-link-color: rgb(171,113,255) !important; - --in-content-link-color-active: rgb(203,158,255) !important; - --in-content-link-color-hover: rgb(203,158,255) !important; - --in-content-link-color-visited: rgb(171,113,255) !important; - --in-content-page-background: rgb(41,29,79) !important; - --in-content-page-color: rgb(171,113,255) !important; - --in-content-primary-button-background: rgb(171,113,255) !important; - --in-content-primary-button-background-active: rgb(203,158,255) !important; - --in-content-primary-button-background-hover: rgb(203,158,255) !important; - --in-content-primary-button-border-color: rgb(171,113,255) !important; - --in-content-primary-button-border-hover: rgb(203,158,255) !important; - --in-content-primary-button-text-color: white !important; - --in-content-primary-button-text-color-hover: white !important; - --in-content-selected-text: white !important; - --in-content-table-background: rgb(41,29,79) !important; - --in-content-table-border-color: rgb(171,113,255) !important; - --in-content-table-border-dark-color: rgb(144,89,255) !important; - --in-content-table-header-background: rgb(41,29,79) !important; - --in-content-table-header-color: white !important; - --in-content-text-color: white !important; - --in-content-warning-container: darkorange !important; - --shadow-10: 0 1px 4px black !important; - --shadow-30: 0 4px 16px black !important; - color: white !important; - } - ::selection { - background: rgb(171,113,255) !important; - color: white !important; - } - - /* About:Addons */ - #categories > .category[selected], #categories > .category.selected { - background-color: var(--in-content-button-background) !important; - color: var(--in-content-button-text-color) !important; - } - .addon.card { - background-color: var(--addon-card-background) !important; - } - .radio-container-with-text > input { - border: 2px solid !important; - background-color: var(--in-content-page-background) !important; - color: var(--in-content-page-color) !important; - } - .radio-container-with-text > input:hover { - background-color: var(--in-content-button-background-hover) !important; - } - .radio-container-with-text > input:active { - background-color: var(--in-content-button-background-active) !important; - } - - /* About:Preferences */ - .radio-check { - border: 2px solid !important; - border-color: white !important; - background-color: var(--in-content-page-background) !important; - } - .radio-check[selected] { - border-color: var(--in-content-page-color) !important; - color: var(--in-content-page-color) !important; - } - .web-appearance-choice-image-container { - background-color: var(--in-content-page-background) !important; - } - .web-appearance-choice-image-container:hover { - background-color: var(--in-content-button-background-hover) !important; - } - .web-appearance-choice-image-container:active { - background-color: var(--in-content-button-background-active) !important; - } - .web-appearance-choice input { - background-color: var(--in-content-page-background) !important; - border: 2px solid !important; - border-color: var(--in-content-page-color) !important; - color: var(--in-content-page-color) !important; - } - .web-appearance-choice input:hover { - background-color: var(--in-content-button-background-hover) !important; - } - .web-appearance-choice input:active { - background-color: var(--in-content-button-background-active) !important; - } - -} - -@-moz-document -regexp("^(?!about:).*") { - - /* Apply this customization only on smaller screens in portrait mode */ - @media (orientation: portrait) { - @media (max-width: 720px) { - - /* Table font size (prevents horizontal scroll on some web pages) */ - tr { - font-size: 13px; - } - - } - -} - -@-moz-document -url("about:addons"), -url-prefix("about:addons") { - - /* Apply this customization only on smaller screens in landscape mode */ - @media (orientation: landscape) { - @media (max-height: 650px) { - - /* Page width */ - :root { - --in-content-sidebar-width: 50px !important; - --sidebar-width: 50px !important; - } - body { - min-width: 100vw !important; - max-width:100vw !important; - width: 100vw !important; - } - - /* About:Addons */ - .search-label, - .textbox-search-icons { - display: none !important; - } - input::placeholder { - color: white !important; - opacity: 100% !important; - } - search-addons > search-textbox { - background-color: var(--in-content-button-background) !important; - color: var(--in-content-button-text-color) !important; - position: fixed !important; - top: 0 !important; - left: 0 !important; - padding: 0 !important; - width: 49px !important; - } - search-addons > search-textbox:hover { - background-color: var(--in-content-button-background-hover) !important; - } - search-addons > search-textbox:active { - background-color: var(--in-content-button-background-active) !important; - } - search-addons > search-textbox[focused] { - background-color: var(--in-content-page-background) !important; - border: 2px solid var(--card-outline-color) !important; - width: 100vw !important; - z-index: 2 !important; - } - .main-search { - padding-top: 18px !important; - padding-bottom: 18px !important; - } - .main-heading { - position: fixed !important; - top: 0 !important; - padding: 0 !important; - } - .page-options-menu { - position: fixed !important; - top: 0 !important; - right: 0 !important; - } - #categories > .category { - margin-left: 0px !important; - } - .sidebar-footer-list { - margin-inline-start: 0 !important; - } - .list-section-heading { - margin-top: 0 !important; - } - .addon-description { - padding-right: 40px !important; - } - .addon-badge-recommended { - margin-right: 10px !important; - } - .more-options-button { - margin-inline-start: -6px !important; - min-width: 36px !important; - } - .toggle-button { - margin-right: -60px !important; - margin-bottom: -60px !important; - height: 12px !important; - width: 24px !important; - } - .toggle-button:before { - margin-top: -4px !important; - margin-left: -6px !important; - height: 18px !important; - width: 18px !important; - } - - } - } - - /* Apply this customization only on smaller screens in portrait mode */ - @media (orientation: portrait) { - @media (max-width: 720px) { - - /* Page width */ - :root { - --in-content-sidebar-width: 50px !important; - --sidebar-width: 50px !important; - } - body { - min-width: 100vw !important; - max-width:100vw !important; - width: 100vw !important; - } - - /* About:Addons */ - .search-label, - .textbox-search-icons { - display: none !important; - } - input::placeholder { - color: white !important; - opacity: 100% !important; - } - search-addons > search-textbox { - background-color: var(--in-content-button-background) !important; - color: var(--in-content-button-text-color) !important; - position: fixed !important; - top: 0 !important; - left: 0 !important; - padding: 0 !important; - width: 49px !important; - } - search-addons > search-textbox:hover { - background-color: var(--in-content-button-background-hover) !important; - } - search-addons > search-textbox:active { - background-color: var(--in-content-button-background-active) !important; - } - search-addons > search-textbox[focused] { - background-color: var(--in-content-page-background) !important; - border: 2px solid var(--card-outline-color) !important; - width: 100vw !important; - z-index: 2 !important; - } - .main-search { - padding-top: 18px !important; - padding-bottom: 18px !important; - } - .main-heading { - position: fixed !important; - top: 0 !important; - padding: 0 !important; - } - .page-options-menu { - position: fixed !important; - top: 0 !important; - right: 0 !important; - } - #categories > .category { - margin-left: 0px !important; - } - .sidebar-footer-list { - margin-inline-start: 0 !important; - } - .list-section-heading { - margin-top: 0 !important; - } - .addon-description { - padding-right: 40px !important; - } - .addon-badge-recommended { - margin-right: 10px !important; - } - .more-options-button { - margin-inline-start: -6px !important; - min-width: 36px !important; - } - .toggle-button { - margin-right: -60px !important; - margin-bottom: -60px !important; - height: 12px !important; - width: 24px !important; - } - .toggle-button:before { - margin-top: -4px !important; - margin-left: -6px !important; - height: 18px !important; - width: 18px !important; - } - - /* Reduce addon cards width and font to fit display without horizontal scrolling */ - .card { - max-width: 250px !important; - font-size: 8pt !important; - } - - } - } - -} - -@-moz-document -url("about:config") { - - /* Apply this customization only on smaller screens in landscape mode */ - @media (orientation: landscape) { - @media (max-height: 650px) { - - /* About:Config */ - #search-container, - #toolbar, - #prefs { - min-width: calc(100vw - 20px) !important; - } - #toolbar { - flex-direction: column; - } - #prefs { - word-wrap: anywhere; - } - .checkbox-container { - margin-top: 6px; - padding-bottom: 3px; - } - tr { - font-size: 12px; - } - th { - padding-left: 8px !important; - } - - } - } - - /* Apply this customization only on smaller screens in portrait mode */ - @media (orientation: portrait) { - @media (max-width: 720px) { - - /* About:Config */ - #search-container, - #toolbar, - #prefs { - min-width: calc(100vw - 20px) !important; - } - #toolbar { - flex-direction: column; - } - #prefs { - word-wrap: anywhere; - } - .checkbox-container { - margin-top: 6px; - padding-bottom: 3px; - } - tr { - font-size: 12px; - } - th { - padding-left: 8px !important; - } - - } - } - -} - -@-moz-document -url("about:license") { - - /* Apply this customization only on smaller screens in landscape mode */ - @media (orientation: landscape) { - @media (max-height: 650px) { - - /* About:License */ - .license-header { - background-image: none !important; - padding-inline-end: unset !important; - } - #lic-info > pre { - font-size: 4pt !important; - } - - } - } - - /* Apply this customization only on smaller screens in portrait mode */ - @media (orientation: portrait) { - @media (max-width: 720px) { - - /* About:License */ - .license-header { - background-image: none !important; - padding-inline-end: unset !important; - } - #lic-info > pre { - font-size: 4pt !important; - } - - } - } - -} - -@-moz-document -url("about:policies"), -url-prefix("about:policies") { - - /* Apply this customization only on smaller screens in landscape mode */ - @media (orientation: landscape) { - @media (max-height: 650px) { - - /* Page width */ - :root { - --in-content-sidebar-width: 50px !important; - --sidebar-width: 50px !important; - } - - /* About:Policies */ - #categories > .category { - margin-left: 0px !important; - } - td { - font-size: 9px; - padding-left: 5px !important; - padding-right: 5px !important; - word-wrap: anywhere; - } - - } - } - - /* Apply this customization only on smaller screens in portrait mode */ - @media (orientation: portrait) { - @media (max-width: 720px) { - - /* Page width */ - :root { - --in-content-sidebar-width: 50px !important; - --sidebar-width: 50px !important; - } - - /* About:Policies */ - #categories > .category { - margin-left: 0px !important; - } - td { - font-size: 9px; - padding-left: 5px !important; - padding-right: 5px !important; - word-wrap: anywhere; - } - - } - } - -} - -@-moz-document -regexp("about:preferences.*") { - - /* Apply this customization only on smaller screens in landscape mode */ - @media (orientation: landscape) { - @media (max-height: 650px) { - - /* Page width */ - :root { - --in-content-sidebar-width: 50px !important; - --sidebar-width: 50px !important; - } - - /* About:Preferences */ - #searchInput { - display: none !important; - } - .pane-container { - margin-inline-start: 10px !important; - margin-inline-end: 10px !important; - width: calc(100vw - 70px) !important; - min-width: calc(100vw - 70px) !important; - } - #category-general, - #category-home, - #category-search, - #category-privacy, - #category-more-from-mozilla { - width: 48px !important; - } - #categories > .category { - margin-left: 0px !important; - } - .sidebar-footer-list { - margin-inline-start: 0 !important; - } - label.web-appearance-choice:nth-child(1) > div:nth-child(2) > span:nth-child(2) { - display: none !important; - } - label.web-appearance-choice:nth-child(1) > div:nth-child(2)::after { - content: "Auto" !important; - } - .accessory-button { - min-width: 100px !important; - } - #defaultFont, - #advancedFonts { - max-width: 100px !important; - width: 100px !important; - } - #defaultFontSizeLabel { - margin-left: -196px !important; - } - #defaultFontSizeLabel, - #defaultFontSize { - margin-bottom: -80px !important; - } - #primaryBrowserLocale { - min-width: 20px !important; - } - - /* About:Preferences#Privacy */ - #contentBlockingHeader { - padding-left: 28px !important; - } - #trackingProtectionShield { - margin-inline-end: 0 !important; - margin-top: -34px !important; - max-height: 20px !important; - max-width: 20px !important; - height: 20px !important; - width: 20px !important; - } - #contentBlockingDescription { - font-size: 9pt !important; - } - #trackingProtectionExceptions { - padding-left: 0 !important; - padding-right: 0 !important; - max-width: 30px !important; - width: 30px !important; - } - #historyMode { - max-width: 235.5px !important; - width: 235.5px !important; - } - - /* About:Preferences#MoreFromMozilla */ - .simple .qr-code-box-title { - max-width: 235px !important; - width: 235px !important; - } - - } - } - - /* Apply this customization only on smaller screens in portrait mode */ - @media (orientation: portrait) { - @media (max-width: 720px) { - - /* Page width */ - :root { - --in-content-sidebar-width: 50px !important; - --sidebar-width: 50px !important; - } - - /* About:Preferences */ - #searchInput { - display: none !important; - } - .pane-container { - margin-inline-start: 10px !important; - margin-inline-end: 10px !important; - width: calc(100vw - 70px) !important; - min-width: calc(100vw - 70px) !important; - } - #category-general, - #category-home, - #category-search, - #category-privacy, - #category-more-from-mozilla { - width: 48px !important; - } - #categories > .category { - margin-left: 0px !important; - } - .sidebar-footer-list { - margin-inline-start: 0 !important; - } - label.web-appearance-choice:nth-child(1) > div:nth-child(2) > span:nth-child(2) { - display: none !important; - } - label.web-appearance-choice:nth-child(1) > div:nth-child(2)::after { - content: "Auto" !important; - } - .accessory-button { - min-width: 100px !important; - } - #defaultFont, - #advancedFonts { - max-width: 100px !important; - width: 100px !important; - } - #defaultFontSizeLabel { - margin-left: -196px !important; - } - #defaultFontSizeLabel, - #defaultFontSize { - margin-bottom: -80px !important; - } - #primaryBrowserLocale { - min-width: 20px !important; - } - - /* About:Preferences#Privacy */ - #contentBlockingHeader { - padding-left: 28px !important; - } - #trackingProtectionShield { - margin-inline-end: 0 !important; - margin-top: -34px !important; - max-height: 20px !important; - max-width: 20px !important; - height: 20px !important; - width: 20px !important; - } - #contentBlockingDescription { - font-size: 9pt !important; - } - #trackingProtectionExceptions { - padding-left: 0 !important; - padding-right: 0 !important; - max-width: 30px !important; - width: 30px !important; - } - #historyMode { - max-width: 235.5px !important; - width: 235.5px !important; - } - - /* About:Preferences#MoreFromMozilla */ - .simple .qr-code-box-title { - max-width: 235px !important; - width: 235px !important; - } - - } - } - -} - -@-moz-document -url("about:protections") { - - /* Apply this customization only on smaller screens in landscape mode */ - @media (orientation: landscape) { - @media (max-height: 650px) { - - /* About:Protections */ - #report-content { - margin: 0 !important; - padding: 50px !important; - max-width: 100vw !important; - width: 100vw !important; - } - #mobile-hanger { - display: none !important; - } - .body-wrapper { - grid-column-start: 1 !important; - grid-column-end: -1 !important; - } - #manage-protections, - #sign-up-for-monitor-link, - #save-passwords-button, - #get-proxy-extension-link { - grid-area: 2 / 1 / 2 / 6 !important; - } - .card-header .wrapper { - grid-row-gap: 8px !important; - } - .card:not(.has-logins) .wrapper div:nth-child(1) { - grid-column-end: -1 !important; - } - - } - } - - /* Apply this customization only on smaller screens in portrait mode */ - @media (orientation: portrait) { - @media (max-width: 720px) { - - /* About:Protections */ - #report-content { - margin: 0 !important; - padding: 50px !important; - max-width: 100vw !important; - width: 100vw !important; - } - #mobile-hanger { - display: none !important; - } - .body-wrapper { - grid-column-start: 1 !important; - grid-column-end: -1 !important; - } - #manage-protections, - #sign-up-for-monitor-link, - #save-passwords-button, - #get-proxy-extension-link { - grid-area: 2 / 1 / 2 / 6 !important; - } - .card-header .wrapper { - grid-row-gap: 8px !important; - } - .card:not(.has-logins) .wrapper div:nth-child(1) { - grid-column-end: -1 !important; - } - - } - } - -} - -@-moz-document -url("about:rights") { - - /* Apply this customization only on smaller screens in landscape mode */ - @media (orientation: landscape) { - @media (max-height: 650px) { - - /* About:Rights */ - .rights-header { - background-image: none !important; - padding-inline-end: unset !important; - } - - } - } - - /* Apply this customization only on smaller screens in portrait mode */ - @media (orientation: portrait) { - @media (max-width: 720px) { - - /* About:Rights */ - .rights-header { - background-image: none !important; - padding-inline-end: unset !important; - } - - } - } - -} From 5510dcfebcff738887915bd100b3fdfc306650b5 Mon Sep 17 00:00:00 2001 From: fliegerjohn Date: Wed, 22 Nov 2023 21:52:52 +0100 Subject: [PATCH 06/11] Copy only needed files instead of all --- fenix-fox.sh | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/fenix-fox.sh b/fenix-fox.sh index 9b22136..1f5ce2c 100755 --- a/fenix-fox.sh +++ b/fenix-fox.sh @@ -37,8 +37,10 @@ deploy_fenix_fox() { echo "dir chrome already there, take backup" mv $installdir/chrome $installdir/chrome.original fi - cp -r src/userChrome $installdir/chrome - ln -s $installdir/chrome/userChrome-fenix_fox.css $installdir/chrome/userChrome.css + cp -r src/userChrome/fenix_fox.css $installdir/chrome/ + cp -r src/userChrome/dynamic_popups_pro.css $installdir/chrome/ + cp src/userChrome/userChrome-fenix_fox.css $installdir/chrome/userChrome.css + cp src/userContent/theme-fenix.css $installdir/chrome/userContent.css } # Clonerepo not in use From a0cd858cff5b11ebc4edaf074fa2f751bba33568 Mon Sep 17 00:00:00 2001 From: fliegerjohn Date: Wed, 22 Nov 2023 23:17:01 +0100 Subject: [PATCH 07/11] Add support for different flavors --- fenix-fox.sh | 62 ++++++++++++++++++++++++++++++++++++++++++++-------- 1 file changed, 53 insertions(+), 9 deletions(-) diff --git a/fenix-fox.sh b/fenix-fox.sh index 1f5ce2c..1c92afd 100755 --- a/fenix-fox.sh +++ b/fenix-fox.sh @@ -31,6 +31,31 @@ enable_profile_customizations() { fi } +installcss() { + if [[ ! -n "$2" ]]; then + config="true-mobile" + else + config=$1 + fi + + case $config in + true-mobile) + deploy_true_mobile + ;; + + fenix-fox) + deploy_fenix_fox + ;; + + *) + echo "Available options: true-mobile, fenix-fox" + exit 1 + ;; + + esac + +} + deploy_fenix_fox() { echo "Copy files in place and enable fenix-fox" if [ -d "${installdir}/chrome" ]; then @@ -43,6 +68,22 @@ deploy_fenix_fox() { cp src/userContent/theme-fenix.css $installdir/chrome/userContent.css } +deploy_true_mobile() { + echo "Copy files in place and enable true-mobile" + if [ -d "${installdir}/chrome" ]; then + echo "dir chrome already there, take backup" + mv $installdir/chrome $installdir/chrome.original + fi + cp src/userChrome/{true_mobile_landscape.css,appMenu.css,editBookmarkPanel.css,findbar.css,popups.css,root.css,tabmenu.css,urlbar.css,extensions_menu.css,alt-browser-alt.css,custom_rules.css,iconized_main_menu.css,round_ui_items.css,numbered_tabs.css,tab_counter.css,true_mobile_mode.css,dynamic_popups_pro.css} $installdir/chrome + cp src/userChrome/userChrome-true-mobile.css $installdir/chrome/userChrome.css + cp src/userContent/theme-fenix.css $installdir/chrome/userContent.css +} + +showhelp() { + echo "It's in progress... See https://git.datenkastl.org/pmOS-tweaks/fenix-fox" + +} + # Clonerepo not in use clonerepo() { echo "clone fenix-fox to /tmp" @@ -53,13 +94,16 @@ clonerepo() { # ## Main # +case "$1" in + --install) + enable_profile_customizations + installcss + echo "Finished! Restart firefox and enjoy your new design!" + exit 0 + ;; -# Setup Profile Customizations in user.js -enable_profile_customizations - -# Copy files to profile -deploy_fenix_fox - -# finish -echo "Finished! Restart firefox and enjoy your new design!" - + *) + showhelp + exit 0 + ;; +esac From 0ad2f8c5f6e60a7ce6d79b61b2ae4d3139498e23 Mon Sep 17 00:00:00 2001 From: fliegerjohn Date: Wed, 22 Nov 2023 23:31:21 +0100 Subject: [PATCH 08/11] Fix issue of missing dir chrome --- fenix-fox.sh | 2 ++ 1 file changed, 2 insertions(+) diff --git a/fenix-fox.sh b/fenix-fox.sh index 1c92afd..046dded 100755 --- a/fenix-fox.sh +++ b/fenix-fox.sh @@ -62,6 +62,7 @@ deploy_fenix_fox() { echo "dir chrome already there, take backup" mv $installdir/chrome $installdir/chrome.original fi + mkdir $installdir/chrome cp -r src/userChrome/fenix_fox.css $installdir/chrome/ cp -r src/userChrome/dynamic_popups_pro.css $installdir/chrome/ cp src/userChrome/userChrome-fenix_fox.css $installdir/chrome/userChrome.css @@ -74,6 +75,7 @@ deploy_true_mobile() { echo "dir chrome already there, take backup" mv $installdir/chrome $installdir/chrome.original fi + mkdir $installdir/chrome cp src/userChrome/{true_mobile_landscape.css,appMenu.css,editBookmarkPanel.css,findbar.css,popups.css,root.css,tabmenu.css,urlbar.css,extensions_menu.css,alt-browser-alt.css,custom_rules.css,iconized_main_menu.css,round_ui_items.css,numbered_tabs.css,tab_counter.css,true_mobile_mode.css,dynamic_popups_pro.css} $installdir/chrome cp src/userChrome/userChrome-true-mobile.css $installdir/chrome/userChrome.css cp src/userContent/theme-fenix.css $installdir/chrome/userContent.css From 68754482dc0986497d5a824e11ace1674a7b47c9 Mon Sep 17 00:00:00 2001 From: fliegerjohn Date: Wed, 22 Nov 2023 23:57:27 +0100 Subject: [PATCH 09/11] fix not passing by arguments --- fenix-fox.sh | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/fenix-fox.sh b/fenix-fox.sh index 046dded..412e0c4 100755 --- a/fenix-fox.sh +++ b/fenix-fox.sh @@ -32,10 +32,10 @@ enable_profile_customizations() { } installcss() { - if [[ ! -n "$2" ]]; then + if [[ ! -n "$arg2" ]]; then config="true-mobile" else - config=$1 + config=$arg2 fi case $config in @@ -76,7 +76,7 @@ deploy_true_mobile() { mv $installdir/chrome $installdir/chrome.original fi mkdir $installdir/chrome - cp src/userChrome/{true_mobile_landscape.css,appMenu.css,editBookmarkPanel.css,findbar.css,popups.css,root.css,tabmenu.css,urlbar.css,extensions_menu.css,alt-browser-alt.css,custom_rules.css,iconized_main_menu.css,round_ui_items.css,numbered_tabs.css,tab_counter.css,true_mobile_mode.css,dynamic_popups_pro.css} $installdir/chrome + cp src/userChrome/{true_mobile_landscape.css,appMenu.css,editBookmarkPanel.css,findbar.css,popups.css,root.css,tabmenu.css,urlbar.css,extensions_menu.css,alt-browser-alt.css,custom_rules.css,iconized_main_menu.css,round_ui_items.css,numbered_tabs.css,tab_counter.css,true_mobile_mode.css,dynamic_popups_pro.css} $installdir/chrome/ cp src/userChrome/userChrome-true-mobile.css $installdir/chrome/userChrome.css cp src/userContent/theme-fenix.css $installdir/chrome/userContent.css } @@ -96,7 +96,12 @@ clonerepo() { # ## Main # -case "$1" in + +# fix not passing by arguments +arg1=$1 +arg2=$2 + +case "$arg1" in --install) enable_profile_customizations installcss From be014305fe3d593203c2a7e2b1e38596e5efd39a Mon Sep 17 00:00:00 2001 From: fliegerjohn Date: Thu, 23 Nov 2023 00:16:31 +0100 Subject: [PATCH 10/11] Some improvements --- fenix-fox.sh | 19 ++++++++++--------- 1 file changed, 10 insertions(+), 9 deletions(-) diff --git a/fenix-fox.sh b/fenix-fox.sh index 412e0c4..06e52ca 100755 --- a/fenix-fox.sh +++ b/fenix-fox.sh @@ -31,6 +31,13 @@ enable_profile_customizations() { fi } +takebackup() { + echo "Copy files in place and enable fenix-fox" + if [ -d "${installdir}/chrome" ]; then + echo "dir chrome already there, take backup" + mv $installdir/chrome $installdir/chrome.`date +%Y%m%d-%H%M%S` + fi +} installcss() { if [[ ! -n "$arg2" ]]; then config="true-mobile" @@ -58,10 +65,7 @@ installcss() { deploy_fenix_fox() { echo "Copy files in place and enable fenix-fox" - if [ -d "${installdir}/chrome" ]; then - echo "dir chrome already there, take backup" - mv $installdir/chrome $installdir/chrome.original - fi + takebackup mkdir $installdir/chrome cp -r src/userChrome/fenix_fox.css $installdir/chrome/ cp -r src/userChrome/dynamic_popups_pro.css $installdir/chrome/ @@ -71,12 +75,9 @@ deploy_fenix_fox() { deploy_true_mobile() { echo "Copy files in place and enable true-mobile" - if [ -d "${installdir}/chrome" ]; then - echo "dir chrome already there, take backup" - mv $installdir/chrome $installdir/chrome.original - fi + takebackup mkdir $installdir/chrome - cp src/userChrome/{true_mobile_landscape.css,appMenu.css,editBookmarkPanel.css,findbar.css,popups.css,root.css,tabmenu.css,urlbar.css,extensions_menu.css,alt-browser-alt.css,custom_rules.css,iconized_main_menu.css,round_ui_items.css,numbered_tabs.css,tab_counter.css,true_mobile_mode.css,dynamic_popups_pro.css} $installdir/chrome/ + cp src/userChrome/* $installdir/chrome/ cp src/userChrome/userChrome-true-mobile.css $installdir/chrome/userChrome.css cp src/userContent/theme-fenix.css $installdir/chrome/userContent.css } From 6f30ce089e81a59b30bc18420b7d4fd7e481ce0e Mon Sep 17 00:00:00 2001 From: fliegerjohn Date: Thu, 23 Nov 2023 00:27:29 +0100 Subject: [PATCH 11/11] Update README.md --- README.md | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index c81943b..de4ed5c 100644 --- a/README.md +++ b/README.md @@ -21,4 +21,16 @@ echo "user_pref("toolkit.legacyUserProfileCustomizations.stylesheets", true); WIP -## Deploy Script Usage \ No newline at end of file +## Deploy Script Usage + +* clone repo +```git clone https://git.datenkastl.org/pmOS-tweaks/fenix-fox.git``` + +* install +```./fenix-fox.sh --install``` + +* choose different flavor, for example "true-mobile" +```./fenix-fox.sh --install true-mobile``` + +* Enjoy firefox on your mobile! :o) +