Add firefox theming among other things

This commit is contained in:
Henry Hiles 2023-08-18 12:45:28 -04:00
parent 954eefbfb5
commit 8793835fdc
9 changed files with 377 additions and 76 deletions

View file

@ -0,0 +1,116 @@
@namespace xul url("http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul");
/* Variables that start with --gnome- are added by me and are assigned
* to elements somewhere in this code. The rest of the variables are
* built-in in Firefox, so you need to add an !important if you wanna
* override them. */
@media (prefers-color-scheme: dark) {
:root {
/* Browser area before a page starts loading */
--gnome-browser-before-load-background: #2e3440;
/* Accent */
--gnome-accent-bg: #3584e4;
--gnome-accent: #78aeed;
/* Toolbars */
--gnome-toolbar-background: var(--gnome-headerbar-background);
--gnome-toolbar-color: #d8dee9;
--gnome-toolbar-border-color: rgba(0, 0, 0, .36);
--gnome-toolbar-icon-fill: #eeeeec;
--gnome-inactive-toolbar-color: #919190;
--gnome-inactive-toolbar-background: var(--gnome-inactive-headerbar-background);
--gnome-inactive-toolbar-border-color: var(--gnome-toolbar-border-color);
--gnome-inactive-toolbar-icon-fill: #919190;
/* Sidebar */
--gnome-sidebar-background: var(--gnome-toolbar-background);
--gnome-inactive-sidebar-background: var(--gnome-sidebar-background);
/* Menus */
--gnome-menu-background: #3b4252;
--gnome-menu-border-color: rgba(0, 0, 0, .14);
--gnome-menu-shadow: 0 1px 5px 1px rgba(0,0,0, .09), 0 2px 14px 3px rgba(0,0,0, .05);
--gnome-menu-button-hover-background: var(--gnome-button-background);
--gnome-menu-separator-color: rgba(255, 255, 255, .1);
/* Header bar */
--gnome-headerbar-background: #2e3440;
--gnome-headerbar-border-color: var(--gnome-toolbar-border-color);
/* --gnome-inactive-headerbar-background: var(--gnome-browser-before-load-background);*/
--gnome-inactive-headerbar-background: #3b4252;
--gnome-inactive-headerbar-border-color: var(--gnome-inactive-toolbar-border-color);
/* Buttons */
--gnome-button-background: rgba(255, 255, 255, .1);
--gnome-button-hover-background: rgba(255, 255, 255, .15);
--gnome-button-active-background: rgba(255, 255, 255, .3);
--gnome-button-flat-hover-background: rgba(255, 255, 255, .07);
--gnome-button-flat-active-background: rgba(255, 255, 255, .1);
--gnome-button-suggested-action-background: var(--gnome-accent-bg);
--gnome-button-destructive-action-background: #e01b24;
--gnome-button-close-background: var(--gnome-button-flat-hover-background);
--gnome-button-hover-close-background:var(--gnome-button-hover-background);
--gnome-button-active-close-background: var(--gnome-button-active-background);
--gnome-toolbar-star-button: #f8e45c;
/* Entries */
--gnome-entry-background: rgba(255, 255, 255, .1);
--gnome-entry-color: #d8dee9;
--gnome-inactive-entry-color: #d6d6d6;
--gnome-focused-urlbar-border-color: rgba(120, 174, 237, .5); /* Same as --gnome-accent but with opacity*/
/* Switch */
--gnome-switch-background: rgba(255, 255, 255, .15);
--gnome-switch-slider-background: #d2d2d2;
--gnome-switch-active-background: var(--gnome-accent-bg);
--gnome-switch-active-slider-background: #d8dee9;
/* Tabs */
--gnome-tabbar-background: var(--gnome-headerbar-background);
--gnome-tabbar-tab-separator-color: rgba(255, 255, 255, .15);
--gnome-tabbar-tab-hover-background: #3a404b; /* Hardcoded color */
--gnome-tabbar-tab-active-background: #3f4551; /* Hardcoded color */
--gnome-tabbar-tab-active-background-contrast: #616979; /* Hardcoded color */
--gnome-tabbar-tab-active-hover-background: #444a56; /* Hardcoded color */
--gnome-inactive-tabbar-background: var(--gnome-inactive-headerbar-background);
--gnome-inactive-tabbar-tab-hover-background: #404857; /* Hardcoded color */
--gnome-inactive-tabbar-tab-active-background: #434a59; /* Hardcoded color */
--gnome-tab-button-background: rgba(0, 0, 0, .5);
--gnome-tab-button-hover-background: rgba(0, 0, 0, .6);
--gnome-tabbar-tab-identity-base-opacity: 0;
--gnome-tabbar-tab-needs-attetion: #546F8E;
}
/* Private window colors */
:root {
--gnome-private-accent: #71A1DB;
/* Toolbars */
--gnome-private-toolbar-background: #1C2438;
--gnome-private-inactive-toolbar-background: var(--gnome-private-toolbar-background);
/* Menus */
--gnome-private-menu-background: #252F49;
/* Header bar */
--gnome-private-headerbar-background: #252F49;
--gnome-private-inactive-headerbar-background: var(--gnome-private-toolbar-background);
/* Tabs */
--gnome-private-tabbar-tab-hover-background: #343e56; /* Hardcoded color */
--gnome-private-tabbar-tab-active-background: #343e56; /* Hardcoded color */
--gnome-private-tabbar-tab-active-background-contrast: #495675; /* Hardcoded color */
--gnome-private-tabbar-tab-active-hover-background: #414a61; /* Hardcoded color */
--gnome-private-inactive-tabbar-tab-hover-background: #242c3f; /* Hardcoded color */
--gnome-private-inactive-tabbar-tab-active-background: #272e41; /* Hardcoded color */
/* Text color for Firefox Logo in new private tab */
--gnome-private-wordmark: #FBFBFE;
/* New private tab background */
--gnome-private-in-content-page-background: #1C2438;
/* Private browsing info box */
--gnome-private-text-primary-color: #FBFBFE;
}
}

101
home-manager/firefox.nix Normal file
View file

@ -0,0 +1,101 @@
{
pkgs,
inputs,
...
}: {
home.file.".mozilla/firefox/quadradical/chrome/firefox-gnome-theme".source = inputs.firefox-gnome-theme;
home.file.".mozilla/firefox/quadradical/chrome/nord.css".source = ./firefox-nord.css;
programs.firefox = {
enable = true;
profiles.quadradical = {
isDefault = true;
userChrome = ''
@import "firefox-gnome-theme/userChrome.css";
@import "nord.css"
'';
userContent = ''
@import "firefox-gnome-theme/userContent.css";
'';
search = {
force = true;
default = "Rabbit Search";
engines = {
"Rabbit Search" = {
urls = [{template = "https://rabbitsearch.org/search?q={searchTerms}";}];
iconUpdateURL = "https://rabbit-company.com/images/logo.png";
updateInterval = 7 * 24 * 60 * 60 * 1000; # One week
};
"Nix Package Search" = {
urls = [
{
template = "https://search.nixos.org/packages";
params = [
{
name = "channel";
value = "unstable";
}
{
name = "query";
value = "{searchTerms}";
}
];
}
];
icon = "${pkgs.nixos-icons}/share/icons/hicolor/scalable/apps/nix-snowflake.svg";
definedAliases = ["@np"];
};
"NixOS Option Search" = {
urls = [
{
template = "https://search.nixos.org/options";
params = [
{
name = "channel";
value = "unstable";
}
{
name = "query";
value = "{searchTerms}";
}
];
}
];
icon = "${pkgs.nixos-icons}/share/icons/hicolor/scalable/apps/nix-snowflake.svg";
definedAliases = ["@no"];
};
"NixOS Wiki" = {
urls = [{template = "https://nixos.wiki/index.php?search={searchTerms}";}];
icon = "${pkgs.nixos-icons}/share/icons/hicolor/scalable/apps/nix-snowflake.svg";
definedAliases = ["@nw"];
};
"Home Manager Option Search" = {
urls = [{template = "https://mipmip.github.io/home-manager-option-search/?query={searchTerms}";}];
icon = "${pkgs.nixos-icons}/share/icons/hicolor/scalable/apps/nix-snowflake.svg";
definedAliases = ["@hm"];
};
"Bing".metaData.hidden = true;
"Google".metaData.hidden = true;
"DuckDuckGo".metaData.hidden = true;
"Amazon.ca".metaData.hidden = true;
"eBay".metaData.hidden = true;
};
};
settings = {
"toolkit.legacyUserProfileCustomizations.stylesheets" = true;
"svg.context-properties.content.enabled" = true;
"browser.uidensity" = 0;
"browser.uiCustomization.state" = "{\"placements\":{\"widget-overflow-fixed-list\":[],\"unified-extensions-area\":[],\"nav-bar\":[\"back-button\",\"forward-button\",\"stop-reload-button\",\"urlbar-container\",\"downloads-button\"],\"toolbar-menubar\":[\"menubar-items\"],\"TabsToolbar\":[\"tabbrowser-tabs\",\"new-tab-button\",\"alltabs-button\"],\"PersonalToolbar\":[\"personal-bookmarks\"]},\"seen\":[\"save-to-pocket-button\",\"developer-button\"],\"dirtyAreaCache\":[\"nav-bar\",\"PersonalToolbar\",\"toolbar-menubar\",\"TabsToolbar\"],\"currentVersion\":19}";
"browser.newtabpage.activity-stream.showSponsoredTopSites" = false;
};
};
};
}

View file

@ -1,4 +1,8 @@
{pkgs, ...}: {
{
pkgs,
inputs,
...
}: {
gtk = {
enable = true;
@ -7,9 +11,9 @@
package = pkgs.papirus-icon-theme;
};
# cursorTheme = {
# name = "Bibata-Modern-Classic";
# package = pkgs.bibata-cursors;
# };
cursorTheme = {
name = "GoogleDot-Blue";
package = inputs.nixpkgs-google.legacyPackages.x86_64-linux.google-cursor;
};
};
}

View file

@ -31,7 +31,6 @@
"window.dialogStyle" = "custom";
"editor.inlineSuggest.enabled" = true;
"window.titleBarStyle" = "custom";
"editor.fontFamily" = "FiraCode Nerd Font";
"editor.fontLigatures" = true;
"editor.formatOnSave" = true;
"editor.defaultFormatter" = "esbenp.prettier-vscode";
@ -41,7 +40,6 @@
"gitlens.statusBar.enabled" = false;
"explorer.confirmDelete" = false;
"workbench.sideBar.location" = "right";
"terminal.external.linuxExec" = "alacritty";
"git.enableSmartCommit" = true;
"explorer.confirmDragAndDrop" = false;
"javascript.updateImportsOnFileMove.enabled" = "always";
@ -62,20 +60,11 @@
"[astro]" = {
"editor.defaultFormatter" = "astro-build.astro-vscode";
};
"cSpell.language" = "en-CAen-GBen";
"prettier.trailingComma" = "none";
"prettier.useTabs" = true;
"editor.minimap.enabled" = false;
"cSpell.userWords" = [
"distrohop"
"dotfiles"
"Hiles"
"micromark"
"qscan"
"qweather"
"webapps"
];
"diffEditor.ignoreTrimWhitespace" = false;
"editor.unicodeHighlight.nonBasicASCII" = false;
};
};
}