[this doesnt work] try to move url bar, tabs, etc to the bottom

This commit is contained in:
LuKe Tidd 2025-03-31 15:49:17 -04:00
parent 2c47ad730d
commit 039432440e
Signed by: luke
GPG Key ID: 75D6600BEF4E8E8F
8 changed files with 286 additions and 3 deletions

5
get_profile Executable file
View File

@ -0,0 +1,5 @@
#!/bin/bash
find "${HOME}/.mozilla/firefox" -maxdepth 1 -type d -name '*.default' \
| while read dir; do
printf '%s\n' "$dir"
done

4
info Normal file
View File

@ -0,0 +1,4 @@
about:config
toolkit.legacyUserProfileCustomizations.stylesheets = true
css is from https://github.com/MrOtherGuy/firefox-csshacks

26
link
View File

@ -1,14 +1,34 @@
#!/bin/bash
here="$(pwd)"
if [[ ! "$here" =~ custom_firefox$ ]]; then
if [[ ! "$here" =~ firefox$ ]]; then
printf 'I dunno where I am\n' >&2
exit 1
fi
# @import url(chrome/navbar_below_content.css);
# @import url(chrome/tabs_below_content.css);
# @import url(chrome/toolbars_below_content.css);
declare -a files
files=(
'userChrome.css'
'userContent.css'
'navbar_below_content.css'
'tabs_below_content.css'
'toolbars_below_content.css'
)
find "${HOME}/.mozilla/firefox" -maxdepth 1 -type d -name '*.default' \
| while read dir; do
printf 'ln -fs "%s/userChrome.css" "%s"\n' "$here" "$dir"
ln -fs "${here}/userChrome.css" "$dir"
dest="${dir}/chrome"
if [[ ! -d "$dest" ]]; then
mkdir "$dest"
fi
for file in "${files[@]}"; do
printf 'ln -fs "%s/%s" "%s"\n' "$here" "$file" "$dest"
ln -fs "${here}/${file}" "$dest"
printf 'ln -fs "%s/%s" "%s"\n' "$here" "$file" "$dest"
ln -fs "${here}/${file}" "$dest"
done
done

58
navbar_below_content.css Normal file
View File

@ -0,0 +1,58 @@
/* Source file https://github.com/MrOtherGuy/firefox-csshacks/tree/master/chrome/navbar_below_content.css made available under Mozilla Public License v. 2.0
See the above repository for updates as well as full license text. */
/* Moves the main toolbar (#nav-bar) to the bottom of the window */
@-moz-document url(chrome://browser/content/browser.xhtml){
:root:not([inFullscreen]){
--uc-bottom-toolbar-height: calc(39px + var(--toolbarbutton-outer-padding) )
}
:root[uidensity="compact"]:not([inFullscreen]){
--uc-bottom-toolbar-height: calc(32px + var(--toolbarbutton-outer-padding) )
}
#browser,
#customization-container{ margin-bottom: var(--uc-bottom-toolbar-height,0px) }
#nav-bar{
position: fixed !important;
bottom: 0px;
/* For some reason -webkit-box behaves internally like -moz-box, but can be used with fixed position. display: flex would work too but it breaks extension menus. */
display: -webkit-box;
width: 100%;
z-index: 1;
}
#nav-bar-customization-target{ -webkit-box-flex: 1; }
:root[lwtheme] #nav-bar{
background-image: linear-gradient(var(--toolbar-bgcolor),var(--toolbar-bgcolor)), var(--lwt-additional-images,var(--toolbar-bgimage)) !important;
background-position: top,var(--lwt-background-alignment);
background-repeat: repeat,var(--lwt-background-tiling);
}
:root[lwtheme-image] #nav-bar{
background-image: linear-gradient(var(--toolbar-bgcolor),var(--toolbar-bgcolor)),var(--lwt-header-image), var(--lwt-additional-images,var(--toolbar-bgimage)) !important;
}
/* Fix panels sizing */
.panel-viewstack{ max-height: unset !important; }
#urlbar[breakout][breakout-extend]{
display: flex !important;
flex-direction: column-reverse !important;
bottom: 0px !important; /* Change to 3-5 px if using compact_urlbar_megabar.css depending on toolbar density */
top: auto !important;
}
.urlbarView-body-inner{ border-top-style: none !important; }
@media (-moz-platform: linux){
#notification-popup[side="top"]{
margin-top: calc(-2 * var(--panel-padding-block) - 40px - 32px - 8.5em) !important;
}
#permission-popup[side="top"]{
margin-top: calc(-2 * var(--panel-padding-block) - 2.5em);
}
}
}

113
tabs_below_content.css Normal file
View File

@ -0,0 +1,113 @@
/* Source file https://github.com/MrOtherGuy/firefox-csshacks/tree/master/chrome/tabs_below_content_v2.css made available under Mozilla Public License v. 2.0
See the above repository for updates as well as full license text. */
/* Requires Fx 133+ */
@media (-moz-bool-pref: "userchrome.force-window-controls-on-left.enabled"),
-moz-pref("userchrome.force-window-controls-on-left.enabled"){
#nav-bar > .titlebar-buttonbox-container{
order: -1 !important;
> .titlebar-buttonbox{
flex-direction: row-reverse;
}
}
}
@media not (-moz-bool-pref: "sidebar.verticalTabs"),
not -moz-pref("sidebar.verticalTabs"){
#main-window > body{
display: grid !important;
grid-template-rows: repeat(8,max-content) 1fr;
grid-auto-rows: auto;
}
#navigator-toolbox{
display: contents;
}
:root[sizemode="fullscreen"]:not([inDOMFullscreen]) #toolbar-menubar{
min-height: 0 !important;
}
#main-window #browser{
grid-row: 9/10;
}
#TabsToolbar{
grid-row: 10/11;
background-attachment: scroll;
}
.browser-toolbar{
background: inherit;
background-attachment: fixed;
}
#TabsToolbar > :is(.titlebar-buttonbox-container,.titlebar-spacer){
display: none;
}
:root[sizemode="fullscreen"] #nav-bar > .titlebar-buttonbox-container{
display: flex !important;
}
:root:is([tabsintitlebar],[customtitlebar]) #toolbar-menubar:not([autohide="false"]) ~ #nav-bar{
> .titlebar-buttonbox-container{
display: flex !important;
}
:root[sizemode="normal"] & {
> .titlebar-spacer{
display: flex !important;
}
}
:root[sizemode="maximized"] & {
> .titlebar-spacer[type="post-tabs"]{
display: flex !important;
}
}
@media (-moz-bool-pref: "userchrome.force-window-controls-on-left.enabled"),
-moz-pref("userchrome.force-window-controls-on-left.enabled"),
(-moz-gtk-csd-reversed-placement),
(-moz-platform: macos){
> .titlebar-spacer[type="post-tabs"]{
display: none !important;
}
> .titlebar-spacer[type="pre-tabs"]{
display: flex !important;
}
}
}
@media (-moz-bool-pref: "browser.fullscreen.autohide"),
-moz-pref("browser.fullscreen.autohide"){
#main-window[sizemode="fullscreen"]:not([inDOMFullscreen]){
> body {
grid-template-rows: repeat(8,0px) 1fr;
grid-auto-rows: 0px;
}
& #nav-bar{
height: min-content;
z-index: 1;
transition: transform 133ms ease-in-out 400ms !important;
transform: rotateX(89.9deg);
transform-origin: top;
&:hover{
transition-delay: 0ms !important;
transform: rotateX(0deg);
}
}
& #TabsToolbar{
opacity: 0 !important;
will-change: unset !important;
transform: translateY(calc(100% - 1px));
transition: transform 66.7ms ease-in-out 100ms, opacity 66.7ms linear 66.7ms !important;
height: min-content;
align-self: end;
z-index: 2;
&:hover{
transition-delay: 0ms !important;
transform: translateY(0);
opacity: 1 !important;
}
}
& #mainPopupSet:has(> [panelopen]:not(#ask-chat-shortcuts,#selection-shortcut-action-panel,#chat-shortcuts-options-panel,#tab-preview-panel)) ~ #navigator-toolbox > #nav-bar{
transition-delay: 0ms !important;
transform: rotateX(0deg);
}
& #mainPopupSet:has(> #tabContextMenu:hover) ~ #navigator-toolbox #TabsToolbar{
transition-delay: 0ms;
transform: translateY(0);
opacity: 1 !important;
}
}
}
}

View File

@ -0,0 +1,79 @@
/* Source file https://github.com/MrOtherGuy/firefox-csshacks/tree/master/chrome/toolbars_below_content_v2.css made available under Mozilla Public License v. 2.0
See the above repository for updates as well as full license text. */
/* This requires Firefox 133
* By default tabs will be the top-most toolbar, but you can set the following pref to move them to bottom:
* userchrome.toolbars-below-content.tabs-at-bottom.enabled
*/
#navigator-toolbox{
display: contents;
--uc-navbar-height: 40px;
}
:root[uidensity="compact"] #navigator-toolbox{
--uc-navbar-height: 34px;
}
#main-window > body > #browser,
.global-notificationbox,
#tab-notification-deck,
#toolbar-menubar{
order: -1;
}
#TabsToolbar{
max-height: calc((var(--tab-min-height) + 2 * var(--tab-block-margin,0px)) * var(--multirow-n-rows,1));
}
#toolbar-menubar,
#TabsToolbar{
background: inherit !important;
}
@media (-moz-platform: linux){
:root[sizemode="normal"][customtitlebar] #toolbar-menubar{
border-top-left-radius: inherit;
border-top-right-radius: inherit;
}
#toolbar-menubar,
#TabsToolbar{
opacity: 1 !important;
will-change: unset !important;
}
#notification-popup[side="top"]{
margin-top: calc(-2 * var(--panel-padding-block) - 40px - 32px - 8.5em) !important;
}
#permission-popup[side="top"]{
margin-top: calc(-2 * var(--panel-padding-block) - 2.5em);
}
}
#nav-bar,
#PersonalToolbar{
background-image: linear-gradient(var(--toolbar-bgcolor),var(--toolbar-bgcolor)), var(--lwt-additional-images,var(--toolbar-bgimage)) !important;
background-position: top,var(--lwt-background-alignment);
background-position-y: calc(0px - var(--tab-min-height) - 2*var(--tab-block-margin,0px));
background-repeat: repeat,var(--lwt-background-tiling);
}
:root[lwtheme-image] #nav-bar,
:root[lwtheme-image] #PersonalToolbar{
background-image: linear-gradient(var(--toolbar-bgcolor),var(--toolbar-bgcolor)),var(--lwt-header-image), var(--lwt-additional-images,var(--toolbar-bgimage)) !important;
}
#PersonalToolbar{
background-position-y: calc(0px - var(--tab-min-height) - 2*var(--tab-block-margin,0px) - var( --uc-navbar-height));
}
#urlbar[breakout][breakout-extend]{
display: flex !important;
flex-direction: column-reverse !important;
transform: translateY(calc(var(--urlbar-container-height) - 100%));
}
#urlbar[breakout-extend]:not([usertyping]) > .urlbar-input-container::after{
display: flex;
content: "";
height: calc(var(--urlbar-min-height) - 2px - 2 * var(--urlbar-container-padding));
}
.urlbarView-body-inner{ border-top-style: none !important; }
@media (-moz-bool-pref: "userchrome.toolbars-below-content.tabs-at-bottom.enabled"),
-moz-pref("userchrome.toolbars-below-content.tabs-at-bottom.enabled"){
#TabsToolbar{
order: 3
}
}

View File

@ -1,3 +1,7 @@
@import url(navbar_below_content.css);
@import url(tabs_below_content.css);
@import url(toolbars_below_content.css);
@namespace url("http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"); /* only needed once */
#eme-notification-icon[firstplay=true] {

0
userContent.css Normal file
View File