109fdb4672
Ensures both tabs and address bar hide and reveal together seamlessly.
124 lines
4.2 KiB
Nix
124 lines
4.2 KiB
Nix
{
|
|
pkgs,
|
|
myConfig,
|
|
id,
|
|
name,
|
|
url,
|
|
...
|
|
}: {
|
|
inherit id name;
|
|
search.force = true;
|
|
search.default = "ddg";
|
|
extensions.force = true;
|
|
extensions.packages = with pkgs.nur.repos.rycee.firefox-addons; [
|
|
ublock-origin
|
|
bitwarden
|
|
tridactyl
|
|
new-tab-override
|
|
];
|
|
|
|
settings = {
|
|
# --- New Tab Override ---
|
|
"extensions.newtaboverride@agenedia.com.url" = url;
|
|
"extensions.newtaboverride@agenedia.com.type" = 1; # URL mode
|
|
|
|
# --- Privacy & Hardening ---
|
|
"browser.contentblocking.category" = "strict";
|
|
"privacy.trackingprotection.enabled" = true;
|
|
"privacy.resistFingerprinting" = true; # Note: Spoofs timezone and caps FPS to 60
|
|
"geo.enabled" = false;
|
|
"media.peerconnection.enabled" = false; # Prevents WebRTC IP leaks
|
|
"network.dns.disablePrefetch" = true;
|
|
"network.prefetch-next" = false;
|
|
|
|
# --- NixOS / Hyprland Integration ---
|
|
"widget.use-xdg-desktop-portal.file-picker" = 1; # Use native file picker
|
|
|
|
# --- UI & Behavior ---
|
|
"browser.compactmode.show" = true;
|
|
"browser.tabs.closeWindowWithLastTab" = false;
|
|
"extensions.pocket.enabled" = false;
|
|
"extensions.screenshots.disabled" = true;
|
|
"browser.topsites.contile.enabled" = false;
|
|
"browser.formfill.enable" = false;
|
|
"browser.search.suggest.enabled" = false;
|
|
"browser.search.suggest.enabled.private" = false;
|
|
"browser.urlbar.suggest.searches" = false;
|
|
"browser.urlbar.showSearchSuggestionsFirst" = false;
|
|
"browser.newtabpage.activity-stream.feeds.section.topstories" = false;
|
|
"browser.newtabpage.activity-stream.feeds.snippets" = false;
|
|
"browser.newtabpage.activity-stream.section.highlights.includePocket" = false;
|
|
"browser.newtabpage.activity-stream.section.highlights.includeBookmarks" = false;
|
|
"browser.newtabpage.activity-stream.section.highlights.includeDownloads" = false;
|
|
"browser.newtabpage.activity-stream.section.highlights.includeVisited" = false;
|
|
"browser.newtabpage.activity-stream.showSponsored" = false;
|
|
"browser.newtabpage.activity-stream.system.showSponsored" = false;
|
|
"browser.newtabpage.activity-stream.showSponsoredTopSites" = false;
|
|
"toolkit.legacyUserProfileCustomizations.stylesheets" = true;
|
|
"extensions.autoDisableScopes" = 0; # Enable extensions by default
|
|
|
|
# --- Homepage & Navigation ---
|
|
"browser.startup.page" = 1; # Always open the homepage
|
|
"browser.startup.homepage" = url;
|
|
"browser.newtab.url" = url; # Try to set newtab to homepage
|
|
"browser.sessionstore.resume_from_crash" = false; # Always start fresh
|
|
"browser.sessionstore.max_tabs_undo" = 0; # Disable undo close tab
|
|
|
|
# --- DNS over HTTPS (Quad9) ---
|
|
"network.trr.mode" = 2; # Use DoH with system fallback
|
|
"network.trr.uri" = "https://dns.quad9.net/dns-query";
|
|
};
|
|
|
|
userChrome = ''
|
|
/* --- Floating Autohide Toolbox (Tabs + Address Bar) --- */
|
|
|
|
:root {
|
|
--toolbox-transition-duration: 0.2s;
|
|
--toolbox-transition-timing-function: ease;
|
|
}
|
|
|
|
#navigator-toolbox {
|
|
position: fixed !important;
|
|
top: 0;
|
|
left: 0;
|
|
width: 100%;
|
|
z-index: 9999 !important;
|
|
transition: transform var(--toolbox-transition-duration) var(--toolbox-transition-timing-function) !important;
|
|
transform: translateY(-100%) !important;
|
|
opacity: 0 !important;
|
|
}
|
|
|
|
/* Reveal on hover */
|
|
#navigator-toolbox:hover,
|
|
#navigator-toolbox:focus-within {
|
|
transform: translateY(0) !important;
|
|
opacity: 1 !important;
|
|
}
|
|
|
|
/* Trigger zone at top of screen */
|
|
#navigator-toolbox::after {
|
|
content: "";
|
|
position: absolute;
|
|
top: 100%; /* Below the hidden toolbox */
|
|
left: 0;
|
|
width: 100%;
|
|
height: 5px; /* Size of the trigger area */
|
|
z-index: 10000 !important;
|
|
}
|
|
|
|
/* Remove native titlebar so it doesn't mess up height */
|
|
#titlebar {
|
|
appearance: none !important;
|
|
margin-bottom: -10px !important; /* Pull things up if needed */
|
|
}
|
|
|
|
/* Ensure content starts at top of screen */
|
|
#browser, #appcontent, tabbrowser, #tab-notification-deck {
|
|
margin-top: 0 !important;
|
|
}
|
|
|
|
/* Hide Bookmarks Toolbar permanently */
|
|
#PersonalToolbar { visibility: collapse !important; }
|
|
'';
|
|
}
|