firefox refactor

This commit is contained in:
Sean Kovacs 2025-11-13 13:41:00 -05:00
commit 258c9682cc
Signed by: sckova
GPG key ID: 00F325187C68651A
7 changed files with 423 additions and 97 deletions

View file

@ -0,0 +1,75 @@
# https://discourse.nixos.org/t/combining-best-of-system-firefox-and-home-manager-firefox-settings/37721
{ pkgs, ... }:
{
programs.firefox = {
enable = true;
profiles = {
default = {
id = 0;
name = "default";
isDefault = true;
userChrome = ./userChrome.css;
extensions = {
force = true;
packages = with pkgs.nur.repos.rycee.firefox-addons; [
ublock-origin
plasma-integration
stylus
violentmonkey
consent-o-matic
privacy-badger
sponsorblock
];
settings = {
"uBlock0@raymondhill.net".settings = {
selectedFilterLists = [
"ublock-filters"
"ublock-badware"
"ublock-privacy"
"ublock-unbreak"
"ublock-quick-fixes"
];
};
"{7a7a4a92-a2a0-41d1-9fd7-1e92480d612d}".settings = {
dbInChromeStorage = true; # required for Stylus
};
};
};
settings = {
"extensions.autoDisableScopes" = 0; # enables all extensions automatically
"xpinstall.signatures.required" = false;
"extensions.update.autoUpdateDefault" = false;
"extensions.update.enabled" = false;
"browser.search.defaultenginename" = "google";
"browser.search.order.1" = "google";
"signon.rememberSignons" = false;
"widget.use-xdg-desktop-portal.file-picker" = 1;
"browser.aboutConfig.showWarning" = false;
"browser.compactmode.show" = true;
"browser.cache.disk.enable" = true; # Set to false if you have a HDD
"browser.warnOnQuitShortcut" = false;
"toolkit.legacyUserProfileCustomizations.stylesheets" = true;
# "mousewheel.default.delta_multiplier_x" = 100;
# "mousewheel.default.delta_multiplier_y" = 100;
# "mousewheel.default.delta_multiplier_z" = 100;
# Firefox 75+ remembers the last workspace it was opened on as part of its session management.
# This is annoying, because I can have a blank workspace, click Firefox from the launcher, and
# then have Firefox open on some other workspace.
"widget.disable-workspace-management" = true;
};
search = {
force = true;
default = "google";
order = [
"google"
];
};
};
};
};
}

View file

@ -0,0 +1,223 @@
@media (prefers-color-scheme: light) {
:root {
/* bookmark_text */
--toolbar-color: #eff1f5ff !important;
/* button_background_active */
--toolbarbutton-active-background: rgba(156, 160, 176, 1) !important;
/* button_background_hover */
--toolbarbutton-hover-background: rgba(204, 208, 218, 1) !important;
/* icons */
--toolbarbutton-icon-fill: #4c4f69ff !important;
/* icons_attention */
--toolbarbutton-icon-fill-attention: #4c4f69ff !important;
/* frame */
--toolbox-non-lwt-bgcolor: #dce0e8ff !important;
/* frame_inactive */
&:where([tabsintitlebar]) {
--toolbox-non-lwt-bgcolor-inactive: #dce0e8ff !important;
}
/* popup */
--arrowpanel-background: #eff1f5ff !important;
/* popup_border */
--arrowpanel-border-color: #9ca0b0ff !important;
/* popup_highlight */
--urlbarView-highlight-background: #9ca0b0ff !important;
/* popup_highlight_text */
--urlbarView-highlight-color: #4c4f69ff !important;
/* popup_text */
--arrowpanel-color: #4c4f69ff !important;
/* tab_background_text */
--toolbox-non-lwt-textcolor: #4c4f69ff !important;
/* tab_line */
.tab-background[selected]:not([multiselected]) {
outline: 1px solid #9ca0b0ff;
outline-offset: -1px;
}
.tab-background[multiselected] {
--focus-outline-color: #9ca0b0ff;
}
/* tab_loading */
#tabbrowser-tabs {
--tab-loading-fill: #9ca0b0ff !important;
}
/* tab_selected */
--tab-selected-bgcolor: #eff1f5ff !important;
/* tab_text */
--tab-selected-textcolor: #4c4f69ff !important;
/* toolbar */
--toolbar-bgcolor: #eff1f5ff !important;
/* toolbar_bottom_separator */
--chrome-content-separator-color: #eff1f5ff !important;
/* toolbar_field */
--input-bgcolor: #e6e9efff !important;
--toolbar-field-background-color: var(--input-bgcolor) !important;
/* toolbar_field_border */
--input-border-color: #eff1f5ff !important;
--toolbar-field-border-color: var(--input-border-color) !important;
/* toolbar_field_border_focus */
--toolbar-field-focus-border-color: #6c7086ff !important;
/* toolbar_field_focus */
--toolbar-field-focus-background-color: #eff1f5ff !important;
/* toolbar_field_highlight */
#urlbar-input,
.searchbar-textbox {
&:focus::selection {
background-color: #6c7086ff;
}
}
/* toolbar_field_highlight_text */
#urlbar-input,
.searchbar-textbox {
&:focus::selection {
color: #eff1f5ff;
}
}
/* toolbar_field_text */
--input-color: #4c4f69ff !important;
--toolbar-field-color: var(--input-color) !important;
/* toolbar_field_text_focus */
--toolbar-field-focus-color: #4c4f69ff !important;
/* toolbar_vertical_separator */
--toolbarseparator-color: #6c7086ff !important;
}
}
@media (prefers-color-scheme: dark) {
:root {
/* bookmark_text */
--toolbar-color: #1e1e2eff !important;
/* button_background_active */
--toolbarbutton-active-background: rgba(108, 112, 134, 1) !important;
/* button_background_hover */
--toolbarbutton-hover-background: rgba(49, 50, 68, 1) !important;
/* icons */
--toolbarbutton-icon-fill: #cdd6f4ff !important;
/* icons_attention */
--toolbarbutton-icon-fill-attention: #cdd6f4ff !important;
/* frame */
--toolbox-non-lwt-bgcolor: #11111bff !important;
/* frame_inactive */
&:where([tabsintitlebar]) {
--toolbox-non-lwt-bgcolor-inactive: #11111bff !important;
}
/* popup */
--arrowpanel-background: #1e1e2eff !important;
/* popup_border */
--arrowpanel-border-color: #6c7086ff !important;
/* popup_highlight */
--urlbarView-highlight-background: #6c7086ff !important;
/* popup_highlight_text */
--urlbarView-highlight-color: #cdd6f4ff !important;
/* popup_text */
--arrowpanel-color: #cdd6f4ff !important;
/* tab_background_text */
--toolbox-non-lwt-textcolor: #cdd6f4ff !important;
/* tab_line */
.tab-background[selected]:not([multiselected]) {
outline: 1px solid #6c7086ff;
outline-offset: -1px;
}
.tab-background[multiselected] {
--focus-outline-color: #6c7086ff;
}
/* tab_loading */
#tabbrowser-tabs {
--tab-loading-fill: #6c7086ff !important;
}
/* tab_selected */
--tab-selected-bgcolor: #1e1e2eff !important;
/* tab_text */
--tab-selected-textcolor: #cdd6f4ff !important;
/* toolbar */
--toolbar-bgcolor: #1e1e2eff !important;
/* toolbar_bottom_separator */
--chrome-content-separator-color: #1e1e2eff !important;
/* toolbar_field */
--input-bgcolor: #181825ff !important;
--toolbar-field-background-color: var(--input-bgcolor) !important;
/* toolbar_field_border */
--input-border-color: #1e1e2eff !important;
--toolbar-field-border-color: var(--input-border-color) !important;
/* toolbar_field_border_focus */
--toolbar-field-focus-border-color: #6c7086ff !important;
/* toolbar_field_focus */
--toolbar-field-focus-background-color: #1e1e2eff !important;
/* toolbar_field_highlight */
#urlbar-input,
.searchbar-textbox {
&:focus::selection {
background-color: #6c7086ff;
}
}
/* toolbar_field_highlight_text */
#urlbar-input,
.searchbar-textbox {
&:focus::selection {
color: #1e1e2eff;
}
}
/* toolbar_field_text */
--input-color: #cdd6f4ff !important;
--toolbar-field-color: var(--input-color) !important;
/* toolbar_field_text_focus */
--toolbar-field-focus-color: #cdd6f4ff !important;
/* toolbar_vertical_separator */
--toolbarseparator-color: #6c7086ff !important;
}
}