From d12aab5736cb35cd0c7d0853885736e9ebb489ad Mon Sep 17 00:00:00 2001 From: Robert Günzler Date: Mon, 21 Nov 2022 17:23:57 +0100 Subject: firefox: add complete profile dir and support librewolf --- .librewolf | 1 + .mozilla/firefox/hibiki.default/chrome/Makefile | 14 ++ .../firefox/hibiki.default/chrome/lepton.patch | 27 ++++ .../firefox/hibiki.default/chrome/userChrome.css | 165 +++++++++++++++++++++ .../firefox/hibiki.default/chrome/userContent.css | 22 +++ .mozilla/firefox/hibiki.default/times.json | 1 + .mozilla/firefox/hibiki.work/chrome | 1 + .mozilla/firefox/hibiki.work/handlers.json | 1 + .mozilla/firefox/hibiki.work/times.json | 1 + .mozilla/firefox/hibiki.work/user.js | 1 + .mozilla/firefox/installs.ini | 4 + .mozilla/firefox/librewolf.overrides.cfg | 5 + .mozilla/firefox/native-messaging-hosts | 1 + .mozilla/firefox/profiles.ini | 20 +++ .../wr7p23up.default-nightly/chrome/Makefile | 14 -- .../wr7p23up.default-nightly/chrome/lepton.patch | 27 ---- .../wr7p23up.default-nightly/chrome/userChrome.css | 165 --------------------- .../chrome/userContent.css | 22 --- bin/firefox | 8 +- 19 files changed, 269 insertions(+), 231 deletions(-) create mode 120000 .librewolf create mode 100644 .mozilla/firefox/hibiki.default/chrome/Makefile create mode 100644 .mozilla/firefox/hibiki.default/chrome/lepton.patch create mode 100644 .mozilla/firefox/hibiki.default/chrome/userChrome.css create mode 100644 .mozilla/firefox/hibiki.default/chrome/userContent.css create mode 100755 .mozilla/firefox/hibiki.default/times.json create mode 120000 .mozilla/firefox/hibiki.work/chrome create mode 120000 .mozilla/firefox/hibiki.work/handlers.json create mode 100755 .mozilla/firefox/hibiki.work/times.json create mode 120000 .mozilla/firefox/hibiki.work/user.js create mode 100644 .mozilla/firefox/installs.ini create mode 100644 .mozilla/firefox/librewolf.overrides.cfg create mode 120000 .mozilla/firefox/native-messaging-hosts create mode 100644 .mozilla/firefox/profiles.ini delete mode 100644 .mozilla/firefox/wr7p23up.default-nightly/chrome/Makefile delete mode 100644 .mozilla/firefox/wr7p23up.default-nightly/chrome/lepton.patch delete mode 100644 .mozilla/firefox/wr7p23up.default-nightly/chrome/userChrome.css delete mode 100644 .mozilla/firefox/wr7p23up.default-nightly/chrome/userContent.css diff --git a/.librewolf b/.librewolf new file mode 120000 index 0000000..e21a616 --- /dev/null +++ b/.librewolf @@ -0,0 +1 @@ +.mozilla/firefox \ No newline at end of file diff --git a/.mozilla/firefox/hibiki.default/chrome/Makefile b/.mozilla/firefox/hibiki.default/chrome/Makefile new file mode 100644 index 0000000..3e5c8d6 --- /dev/null +++ b/.mozilla/firefox/hibiki.default/chrome/Makefile @@ -0,0 +1,14 @@ +STYLE := proton-style + +all: fetch patch + +.PHONY: fetch +fetch: + @echo Fetching lepton... + curl -sSL "https://github.com/black7375/Firefox-UI-Fix/raw/${STYLE}/css/leptonChrome.css" -o lepton.userChrome.css + curl -sSL "https://github.com/black7375/Firefox-UI-Fix/raw/${STYLE}/css/leptonContent.css" -o lepton.userContent.css + +.PHONY: patch +patch: + @echo Patching lepton... + patch -p1 --reject-file - < lepton.patch diff --git a/.mozilla/firefox/hibiki.default/chrome/lepton.patch b/.mozilla/firefox/hibiki.default/chrome/lepton.patch new file mode 100644 index 0000000..d637994 --- /dev/null +++ b/.mozilla/firefox/hibiki.default/chrome/lepton.patch @@ -0,0 +1,27 @@ +--- ./lepton.userChrome.css 2022-05-24 23:50:09.178033305 +0200 ++++ ./lepton.userChrome.css 2022-05-24 23:49:33.843031418 +0200 +@@ -24,7 +24,6 @@ + /*= Darkmode - Color lighter =================================================*/ + :root[lwtheme-mozlightdark][lwthemetextcolor="bright"], + :root[style*="--lwt-accent-color: rgb(28, 27, 34); --lwt-text-color: rgba(251, 251, 254);"] { +- --toolbar-bgcolor: rgba(43, 42, 51, 5) !important; + /* Original: rgba(43, 42, 51, 1) */ + } + } +@@ -3325,15 +3324,13 @@ + @supports -moz-bool-pref("userChrome.padding.urlbar") { + :root:not([uidensity="touch"]) #urlbar-container, + :root:not([uidensity="touch"]) #search-container { +- padding-block: 3px !important; + /* Original: 4px */ +- margin-inline: 5px !important; + /* Original: 5px */ + } + + :root:not([uidensity="compact"]) #urlbar-container, + :root:not([uidensity="compact"]) #search-container { +- padding-block: 2px !important; ++ /* noop */ + } + + /* spread menu */ diff --git a/.mozilla/firefox/hibiki.default/chrome/userChrome.css b/.mozilla/firefox/hibiki.default/chrome/userChrome.css new file mode 100644 index 0000000..ff39340 --- /dev/null +++ b/.mozilla/firefox/hibiki.default/chrome/userChrome.css @@ -0,0 +1,165 @@ +/* vim: foldmethod=marker + */ + +@import url(lepton.userChrome.css); + +@namespace xul "http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"; +@namespace html "http://www.w3.org/1999/xhtml"; + +@media (-moz-toolbar-prefers-color-scheme: dark), (prefers-color-scheme: dark) { + :root { + --toolbar-non-lwt-bgcolor: #040405 !important; + --toolbar-bgcolor: #040405 !important; + --toolbar-color: #fffffb !important; + } +} + +:root { + --urlbar-box-bgcolor: var(--toolbar-bgcolor) !important; + --urlbar-icon-fill-opacity: 0.8 !important; + --arrowpanel-background: var(--toolbar-bgcolor) !important; + + --chrome-content-separator-color: #70649ab0 !important; +} + +* { + font-family: Iosevka Aile, Sarasa Fixed J, monospace !important; +} + +#titlebar { + display: none !important; +} + +/* Makes urlbar and many other things sharper on the edges */ +:root { + --any-border-radius: 0; + --toolbarbutton-border-radius: var(--any-border-radius) !important; + --urlbar-icon-border-radius: var(--any-border-radius) !important; + --arrowpanel-menuitem-border-radius: var(--any-border-radius) !important; + --arrowpanel-border-radius: var(--any-border-radius) !important; +} +menupopup, panel { + --panel-padding: 0 !important; + --panel-border-radius: var(--any-border-radius) !important; +} +.dialogBox { + border-radius: var(--any-border-radius) !important; +} + +/* Hide the back and forward buttons */ +#main-window :-moz-any(#back-button, #forward-button) { + display: none !important; +} + +/* Disable statuspanel completely, remove this if you want to keep the statuspanel */ +statuspanel { + display: none !important; +} + +/* = URLBAR STUFF =========================================================== */ + +#urlbar-container { + --urlbar-container-height: 29px !important; + --urlbar-container-padding: 0px !important; + /* --lwt-toolbar-field-background-color: transparent !important; */ +} +#urlbar { + --urlbar-height: var(--urlbar-container-height) !important; + --urlbar-toolbar-height: var(--urlbar-container-height) !important; +} +#urlbar-background { + border: none !important; +} +#urlbar:not([focused="true"]) > #urlbar-background { + background-color: transparent !important; +} + +#urlbar-input-container { + padding-right: 5px !important; + border: none !important; +} +#urlbar-results, +.urlbarView-row { + padding-top: 0px !important; + padding-bottom: 0px !important; +} +.search-one-offs { + padding-block: 0px !important; +} +.search-panel-one-offs { + padding-left: 7px !important; +} +.searchbar-engine-one-off-item { + margin: 0px !important; +} + + +/* hide the bookmark button */ +#star-button-box, +#pageActionSeparator { + display: none !important; +} + +/* make sure the lock icon aligns with the collapsed sidebar */ +#urlbar-container { + padding-block: 0 !important; + margin-left: 0 !important; +} +#tracking-protection-icon-container { + padding: 0 6px !important; +} +#identity-box { + margin-inline-start: var(--identity-box-margin-inline); +} +#tracking-protection-icon-container { + padding-left: 8px !important; +} + +/* = SIDEBAR STUFF ========================================================== */ + +/* sidebar that collapses when not hovered */ +:root { + --thin-tab-width: 31px; + --wide-tab-width: 280px; +} +#sidebar { + max-width: none !important; + min-width: 0 !important; + margin-left: 0 !important; +} +#sidebar-box+#sidebar-splitter { + display: none !important; +} +#sidebar-box { + overflow-x: hidden !important; + position: relative !important; + transition: all 40ms !important; + min-width: var(--thin-tab-width) !important; + max-width: var(--thin-tab-width) !important; + + border-right: 1px solid var(--chrome-content-separator-color); + + /* fix collapsed sidebar background-color */ + background-color: var(--toolbar-bgcolor) !important; +} + +#sidebar-box #sidebar,#sidebar-box:hover { + /* transition: all 10ms !important; */ + min-width: var(--wide-tab-width) !important; + max-width: var(--wide-tab-width) !important; + z-index: 1; + opacity: 1.0 !important; +} + +/* For right sidebar change 'margin-right' to 'margin-left' */ +#sidebar-box:hover { + margin-right: calc((var(--wide-tab-width) - var(--thin-tab-width))*-1) !important; +} +/* hide sidebar header */ +#sidebar-header { + visibility: collapse; +} +/* #sidebar-splitter styles the divider between the sidebar and the rest of the browser. */ +#sidebar-splitter { + /* display: none; */ +} diff --git a/.mozilla/firefox/hibiki.default/chrome/userContent.css b/.mozilla/firefox/hibiki.default/chrome/userContent.css new file mode 100644 index 0000000..f3b4e6a --- /dev/null +++ b/.mozilla/firefox/hibiki.default/chrome/userContent.css @@ -0,0 +1,22 @@ + +@import url(lepton.userContent.css); + +/* + dark background in new tabs without a white flash (with tridactyl newtab) + @see: https://github.com/tridactyl/tridactyl/issues/2510 +*/ +:root { + --tridactyl-bg: #2a2a2e !important; + --tridactyl-fg: #b1b1b3 !important; +} + +/* + set the background color of the new tab page (without tridactyl or with tridactyl without newtab) +*/ +@-moz-document url-prefix(about:home), url-prefix(about:newtab), url-prefix(about:blank) { + @media (prefers-color-scheme: dark) { + body { + background: #1d1b19; + } + } +} diff --git a/.mozilla/firefox/hibiki.default/times.json b/.mozilla/firefox/hibiki.default/times.json new file mode 100755 index 0000000..02bb2cf --- /dev/null +++ b/.mozilla/firefox/hibiki.default/times.json @@ -0,0 +1 @@ +{"created":1669046288885,"firstUse":null} diff --git a/.mozilla/firefox/hibiki.work/chrome b/.mozilla/firefox/hibiki.work/chrome new file mode 120000 index 0000000..274c29e --- /dev/null +++ b/.mozilla/firefox/hibiki.work/chrome @@ -0,0 +1 @@ +../hibiki.default/chrome \ No newline at end of file diff --git a/.mozilla/firefox/hibiki.work/handlers.json b/.mozilla/firefox/hibiki.work/handlers.json new file mode 120000 index 0000000..8828eaa --- /dev/null +++ b/.mozilla/firefox/hibiki.work/handlers.json @@ -0,0 +1 @@ +../hibiki.default/handlers.json \ No newline at end of file diff --git a/.mozilla/firefox/hibiki.work/times.json b/.mozilla/firefox/hibiki.work/times.json new file mode 100755 index 0000000..be58369 --- /dev/null +++ b/.mozilla/firefox/hibiki.work/times.json @@ -0,0 +1 @@ +{"created":1669046288885,"firstUse":1669113555029} \ No newline at end of file diff --git a/.mozilla/firefox/hibiki.work/user.js b/.mozilla/firefox/hibiki.work/user.js new file mode 120000 index 0000000..9a05026 --- /dev/null +++ b/.mozilla/firefox/hibiki.work/user.js @@ -0,0 +1 @@ +../hibiki.default/user.js \ No newline at end of file diff --git a/.mozilla/firefox/installs.ini b/.mozilla/firefox/installs.ini new file mode 100644 index 0000000..bfa40eb --- /dev/null +++ b/.mozilla/firefox/installs.ini @@ -0,0 +1,4 @@ +[2BDD5BCC96785009] +Default=hibiki.default +Locked=1 + diff --git a/.mozilla/firefox/librewolf.overrides.cfg b/.mozilla/firefox/librewolf.overrides.cfg new file mode 100644 index 0000000..7619eff --- /dev/null +++ b/.mozilla/firefox/librewolf.overrides.cfg @@ -0,0 +1,5 @@ +defaultPref("media.peerconnection.ice.no_host", false); +defaultPref("webgl.disabled", false); +defaultPref("identity.fxaccounts.enabled", true); +defaultPref("privacy.resistFingerprinting", false); +defaultPref("privacy.resistFingerprinting.autoDeclineNoUserInputCanvasPrompts", true); diff --git a/.mozilla/firefox/native-messaging-hosts b/.mozilla/firefox/native-messaging-hosts new file mode 120000 index 0000000..b24d852 --- /dev/null +++ b/.mozilla/firefox/native-messaging-hosts @@ -0,0 +1 @@ +../native-messaging-hosts \ No newline at end of file diff --git a/.mozilla/firefox/profiles.ini b/.mozilla/firefox/profiles.ini new file mode 100644 index 0000000..ae9aadd --- /dev/null +++ b/.mozilla/firefox/profiles.ini @@ -0,0 +1,20 @@ +[Profile0] +Name=default +IsRelative=1 +Path=hibiki.default +Default=1 + +[Profile1] +Name=work +IsRelative=1 +Path=hibiki.work +Default=0 + +[Install2BDD5BCC96785009] +Default=hibiki.default +Locked=1 + +[General] +StartWithLastProfile=1 +Version=2 + diff --git a/.mozilla/firefox/wr7p23up.default-nightly/chrome/Makefile b/.mozilla/firefox/wr7p23up.default-nightly/chrome/Makefile deleted file mode 100644 index 3e5c8d6..0000000 --- a/.mozilla/firefox/wr7p23up.default-nightly/chrome/Makefile +++ /dev/null @@ -1,14 +0,0 @@ -STYLE := proton-style - -all: fetch patch - -.PHONY: fetch -fetch: - @echo Fetching lepton... - curl -sSL "https://github.com/black7375/Firefox-UI-Fix/raw/${STYLE}/css/leptonChrome.css" -o lepton.userChrome.css - curl -sSL "https://github.com/black7375/Firefox-UI-Fix/raw/${STYLE}/css/leptonContent.css" -o lepton.userContent.css - -.PHONY: patch -patch: - @echo Patching lepton... - patch -p1 --reject-file - < lepton.patch diff --git a/.mozilla/firefox/wr7p23up.default-nightly/chrome/lepton.patch b/.mozilla/firefox/wr7p23up.default-nightly/chrome/lepton.patch deleted file mode 100644 index d637994..0000000 --- a/.mozilla/firefox/wr7p23up.default-nightly/chrome/lepton.patch +++ /dev/null @@ -1,27 +0,0 @@ ---- ./lepton.userChrome.css 2022-05-24 23:50:09.178033305 +0200 -+++ ./lepton.userChrome.css 2022-05-24 23:49:33.843031418 +0200 -@@ -24,7 +24,6 @@ - /*= Darkmode - Color lighter =================================================*/ - :root[lwtheme-mozlightdark][lwthemetextcolor="bright"], - :root[style*="--lwt-accent-color: rgb(28, 27, 34); --lwt-text-color: rgba(251, 251, 254);"] { -- --toolbar-bgcolor: rgba(43, 42, 51, 5) !important; - /* Original: rgba(43, 42, 51, 1) */ - } - } -@@ -3325,15 +3324,13 @@ - @supports -moz-bool-pref("userChrome.padding.urlbar") { - :root:not([uidensity="touch"]) #urlbar-container, - :root:not([uidensity="touch"]) #search-container { -- padding-block: 3px !important; - /* Original: 4px */ -- margin-inline: 5px !important; - /* Original: 5px */ - } - - :root:not([uidensity="compact"]) #urlbar-container, - :root:not([uidensity="compact"]) #search-container { -- padding-block: 2px !important; -+ /* noop */ - } - - /* spread menu */ diff --git a/.mozilla/firefox/wr7p23up.default-nightly/chrome/userChrome.css b/.mozilla/firefox/wr7p23up.default-nightly/chrome/userChrome.css deleted file mode 100644 index ff39340..0000000 --- a/.mozilla/firefox/wr7p23up.default-nightly/chrome/userChrome.css +++ /dev/null @@ -1,165 +0,0 @@ -/* vim: foldmethod=marker - */ - -@import url(lepton.userChrome.css); - -@namespace xul "http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"; -@namespace html "http://www.w3.org/1999/xhtml"; - -@media (-moz-toolbar-prefers-color-scheme: dark), (prefers-color-scheme: dark) { - :root { - --toolbar-non-lwt-bgcolor: #040405 !important; - --toolbar-bgcolor: #040405 !important; - --toolbar-color: #fffffb !important; - } -} - -:root { - --urlbar-box-bgcolor: var(--toolbar-bgcolor) !important; - --urlbar-icon-fill-opacity: 0.8 !important; - --arrowpanel-background: var(--toolbar-bgcolor) !important; - - --chrome-content-separator-color: #70649ab0 !important; -} - -* { - font-family: Iosevka Aile, Sarasa Fixed J, monospace !important; -} - -#titlebar { - display: none !important; -} - -/* Makes urlbar and many other things sharper on the edges */ -:root { - --any-border-radius: 0; - --toolbarbutton-border-radius: var(--any-border-radius) !important; - --urlbar-icon-border-radius: var(--any-border-radius) !important; - --arrowpanel-menuitem-border-radius: var(--any-border-radius) !important; - --arrowpanel-border-radius: var(--any-border-radius) !important; -} -menupopup, panel { - --panel-padding: 0 !important; - --panel-border-radius: var(--any-border-radius) !important; -} -.dialogBox { - border-radius: var(--any-border-radius) !important; -} - -/* Hide the back and forward buttons */ -#main-window :-moz-any(#back-button, #forward-button) { - display: none !important; -} - -/* Disable statuspanel completely, remove this if you want to keep the statuspanel */ -statuspanel { - display: none !important; -} - -/* = URLBAR STUFF =========================================================== */ - -#urlbar-container { - --urlbar-container-height: 29px !important; - --urlbar-container-padding: 0px !important; - /* --lwt-toolbar-field-background-color: transparent !important; */ -} -#urlbar { - --urlbar-height: var(--urlbar-container-height) !important; - --urlbar-toolbar-height: var(--urlbar-container-height) !important; -} -#urlbar-background { - border: none !important; -} -#urlbar:not([focused="true"]) > #urlbar-background { - background-color: transparent !important; -} - -#urlbar-input-container { - padding-right: 5px !important; - border: none !important; -} -#urlbar-results, -.urlbarView-row { - padding-top: 0px !important; - padding-bottom: 0px !important; -} -.search-one-offs { - padding-block: 0px !important; -} -.search-panel-one-offs { - padding-left: 7px !important; -} -.searchbar-engine-one-off-item { - margin: 0px !important; -} - - -/* hide the bookmark button */ -#star-button-box, -#pageActionSeparator { - display: none !important; -} - -/* make sure the lock icon aligns with the collapsed sidebar */ -#urlbar-container { - padding-block: 0 !important; - margin-left: 0 !important; -} -#tracking-protection-icon-container { - padding: 0 6px !important; -} -#identity-box { - margin-inline-start: var(--identity-box-margin-inline); -} -#tracking-protection-icon-container { - padding-left: 8px !important; -} - -/* = SIDEBAR STUFF ========================================================== */ - -/* sidebar that collapses when not hovered */ -:root { - --thin-tab-width: 31px; - --wide-tab-width: 280px; -} -#sidebar { - max-width: none !important; - min-width: 0 !important; - margin-left: 0 !important; -} -#sidebar-box+#sidebar-splitter { - display: none !important; -} -#sidebar-box { - overflow-x: hidden !important; - position: relative !important; - transition: all 40ms !important; - min-width: var(--thin-tab-width) !important; - max-width: var(--thin-tab-width) !important; - - border-right: 1px solid var(--chrome-content-separator-color); - - /* fix collapsed sidebar background-color */ - background-color: var(--toolbar-bgcolor) !important; -} - -#sidebar-box #sidebar,#sidebar-box:hover { - /* transition: all 10ms !important; */ - min-width: var(--wide-tab-width) !important; - max-width: var(--wide-tab-width) !important; - z-index: 1; - opacity: 1.0 !important; -} - -/* For right sidebar change 'margin-right' to 'margin-left' */ -#sidebar-box:hover { - margin-right: calc((var(--wide-tab-width) - var(--thin-tab-width))*-1) !important; -} -/* hide sidebar header */ -#sidebar-header { - visibility: collapse; -} -/* #sidebar-splitter styles the divider between the sidebar and the rest of the browser. */ -#sidebar-splitter { - /* display: none; */ -} diff --git a/.mozilla/firefox/wr7p23up.default-nightly/chrome/userContent.css b/.mozilla/firefox/wr7p23up.default-nightly/chrome/userContent.css deleted file mode 100644 index f3b4e6a..0000000 --- a/.mozilla/firefox/wr7p23up.default-nightly/chrome/userContent.css +++ /dev/null @@ -1,22 +0,0 @@ - -@import url(lepton.userContent.css); - -/* - dark background in new tabs without a white flash (with tridactyl newtab) - @see: https://github.com/tridactyl/tridactyl/issues/2510 -*/ -:root { - --tridactyl-bg: #2a2a2e !important; - --tridactyl-fg: #b1b1b3 !important; -} - -/* - set the background color of the new tab page (without tridactyl or with tridactyl without newtab) -*/ -@-moz-document url-prefix(about:home), url-prefix(about:newtab), url-prefix(about:blank) { - @media (prefers-color-scheme: dark) { - body { - background: #1d1b19; - } - } -} diff --git a/bin/firefox b/bin/firefox index 1b7e271..62d2610 100755 --- a/bin/firefox +++ b/bin/firefox @@ -7,6 +7,8 @@ container=${container:-} [ "${container}" = "firejail" ] && exec xdg-open "$@" bin=${FIREFOX_BIN:-/usr/bin/firefox} +[ ! -x "$bin" ] && bin=/usr/bin/librewolf +[ ! -x "$bin" ] && exit 1 # enable touch device support export MOZ_USE_XINPUT2=1 @@ -21,11 +23,11 @@ firefox) export MOZ_APP_REMOTINGNAME=firefox exec "${bin}" \ --name "$MOZ_APP_REMOTINGNAME" \ - --profile "$HOME"/.mozilla/firefox/wr7p23up.default-nightly \ + --profile "$HOME"/.mozilla/firefox/hibiki.default \ "$@" ;; firefox-private) - exec "${bin}" --profile "$HOME"/.mozilla/firefox/wr7p23up.default-nightly \ + exec "${bin}" --profile "$HOME"/.mozilla/firefox/hibiki.default \ "$@" --private-window ;; @@ -44,7 +46,7 @@ workfox) export MOZ_APP_REMOTINGNAME=workfox exec "${bin}" \ --name "$MOZ_APP_REMOTINGNAME" \ - --profile "$HOME"/.mozilla/firefox/d2ps1x6l.work \ + --profile "$HOME"/.mozilla/firefox/hibiki.work \ "$@" ;; -- cgit 1.4.1