diff --git a/modules/firefox.nix b/modules/firefox/default.nix similarity index 95% rename from modules/firefox.nix rename to modules/firefox/default.nix index 26d4a23..b87c9be 100644 --- a/modules/firefox.nix +++ b/modules/firefox/default.nix @@ -52,6 +52,8 @@ with lib; { # TODO: Consider other themes # https://github.com/soulhotel/FF-ULTIMA + # BUG: Tab groups not yet supported + # https://github.com/rafaelmardojai/firefox-gnome-theme/issues/901 # Import CSS theme with solarized overrides # https://github.com/rafaelmardojai/firefox-gnome-theme # https://github.com/rafaelmardojai/firefox-gnome-theme/blob/master/theme/colors/dark.css @@ -61,37 +63,7 @@ with lib; { userChrome = mkIf theme '' @import "${inputs.firefox-gnome-theme}/userChrome.css"; - - :root { - --gnome-accent: #d33682; - --gnome-window-background: #002b36; - --gnome-window-color: #93a1a1; - --gnome-view-background: #073642; - --gnome-sidebar-background: #002b36; - --gnome-secondary-sidebar-background: #002b36; - --gnome-menu-background: #073642; - --gnome-headerbar-background: #002b36; - --gnome-toolbar-icon-fill: #93a1a1; - --gnome-tabbar-tab-hover-background: #073642; - --gnome-tabbar-tab-active-background: #073642; - --gnome-tabbar-tab-active-hover-background: #073642; - } - - :root:-moz-window-inactive { - --gnome-inactive-entry-color: #586e75; - --gnome-tabbar-tab-hover-background: #073642; - --gnome-tabbar-tab-active-background: #073642; - } - - /* Center bookmarks */ - #PlacesToolbarItems { - justify-content: center; - } - - /* Disable bookmark folder icons */ - .bookmark-item[container] > .toolbarbutton-icon { - display: none; - } + ${builtins.readFile ./userChrome.css} ''; containersForce = true; diff --git a/modules/firefox/userChrome.css b/modules/firefox/userChrome.css new file mode 100644 index 0000000..5cf491b --- /dev/null +++ b/modules/firefox/userChrome.css @@ -0,0 +1,34 @@ +/*** +https://github.com/rafaelmardojai/firefox-gnome-theme +***/ + +:root { + --gnome-accent: #d33682; + --gnome-window-background: #002b36; + --gnome-window-color: #93a1a1; + --gnome-view-background: #073642; + --gnome-sidebar-background: #002b36; + --gnome-secondary-sidebar-background: #002b36; + --gnome-menu-background: #073642; + --gnome-headerbar-background: #002b36; + --gnome-toolbar-icon-fill: #93a1a1; + --gnome-tabbar-tab-hover-background: #073642; + --gnome-tabbar-tab-active-background: #073642; + --gnome-tabbar-tab-active-hover-background: #073642; +} + +:root:-moz-window-inactive { + --gnome-inactive-entry-color: #586e75; + --gnome-tabbar-tab-hover-background: #073642; + --gnome-tabbar-tab-active-background: #073642; +} + +/* Center bookmarks */ +#PlacesToolbarItems { + justify-content: center; +} + +/* Disable bookmark folder icons */ +.bookmark-item[container] > .toolbarbutton-icon { + display: none; +} diff --git a/options/custom/programs/firefox/firefox.nix b/options/custom/programs/firefox/firefox.nix index 0635f64..54a6db0 100644 --- a/options/custom/programs/firefox/firefox.nix +++ b/options/custom/programs/firefox/firefox.nix @@ -17,7 +17,7 @@ in { { # https://www.mozilla.org/en-US/firefox/developer programs.firefox = mkMerge [ - (import "${inputs.self}/modules/firefox.nix" {inherit config inputs lib pkgs;}) + (import "${inputs.self}/modules/firefox/default.nix" {inherit config inputs lib pkgs;}) { enable = true; diff --git a/options/custom/programs/firefox/librewolf.nix b/options/custom/programs/firefox/librewolf.nix index 44033f7..7ed5235 100644 --- a/options/custom/programs/firefox/librewolf.nix +++ b/options/custom/programs/firefox/librewolf.nix @@ -18,7 +18,7 @@ in { # https://librewolf.net/ # https://codeberg.org/librewolf programs.librewolf = mkMerge [ - (import "${inputs.self}/modules/firefox.nix" {inherit config inputs lib pkgs;}) + (import "${inputs.self}/modules/firefox/default.nix" {inherit config inputs lib pkgs;}) { enable = true; diff --git a/options/custom/programs/firefox/zen-browser.nix b/options/custom/programs/firefox/zen-browser.nix index edfd35f..46e7544 100644 --- a/options/custom/programs/firefox/zen-browser.nix +++ b/options/custom/programs/firefox/zen-browser.nix @@ -18,7 +18,7 @@ in { # https://zen-browser.app/ # https://github.com/youwen5/zen-browser-flake programs.zen-browser = mkMerge [ - (import "${inputs.self}/modules/firefox.nix" { + (import "${inputs.self}/modules/firefox/default.nix" { inherit config inputs lib pkgs; # TODO: Revisit Zen themes