From d1e311a5b47a8da45036ff7c6c8a51aadf5c859e Mon Sep 17 00:00:00 2001 From: brustybee Date: Tue, 24 Mar 2026 00:34:39 +0530 Subject: this is interesting and i love interesting stuff --- common/modules/matugen/default.nix | 10 +- .../modules/matugen/templates/matugen-wlogout.nix | 11 -- common/modules/matugen/templates/matugen-zen.nix | 115 +++++++++++++++++++++ common/programs/firefox.nix | 20 +--- common/programs/zenBrowser.nix | 6 +- 5 files changed, 128 insertions(+), 34 deletions(-) delete mode 100644 common/modules/matugen/templates/matugen-wlogout.nix (limited to 'common') diff --git a/common/modules/matugen/default.nix b/common/modules/matugen/default.nix index f67c99a..e9e9252 100644 --- a/common/modules/matugen/default.nix +++ b/common/modules/matugen/default.nix @@ -77,7 +77,6 @@ in xdg.configFile = { "matugen/config.toml" = { - # enable = !config.programs.noctalia-shell.enable; text = # toml '' @@ -151,10 +150,6 @@ in # post_hook = "pkill -SIGUSR2 waybar" ''} - [templates.wlogout] - input_path = "~/.config/matugen/templates/wlogout.css" - output_path = "~/.config/wlogout/colors.css" - ${lib.optionalString config.services.dunst.enable '' [templates.dunst] input_path = '~/.config/matugen/templates/dunstrc' @@ -197,6 +192,11 @@ in input_path = '~/.config/matugen/templates/zen.css' output_path = '~/.config/wallust/templates/userChrome.css' post_hook = "${link_zen}" + + [templates.zen-userContent] + input_path = '~/.config/matugen/templates/zen-usercontent.css' + output_path = '~/.config/userContent.css' + post_hook = "${link_zen}" ''; }; }; diff --git a/common/modules/matugen/templates/matugen-wlogout.nix b/common/modules/matugen/templates/matugen-wlogout.nix deleted file mode 100644 index d982a00..0000000 --- a/common/modules/matugen/templates/matugen-wlogout.nix +++ /dev/null @@ -1,11 +0,0 @@ -{ - xdg.configFile."matugen/templates/wlogout.css" = { - text = '' - /* Generated by Matugen - GTK3 Color Variables */ - @define-color surface_bg rgba({{ colors.surface.default.red }}, {{ colors.surface.default.green }}, {{ colors.surface.default.blue }}, 0.69); - @define-color primary_accent {{ colors.primary.default.hex }}; - @define-color on_surface {{ colors.on_surface.default.hex }}; - @define-color hover_bg rgba({{ colors.primary_container.default.red }}, {{ colors.primary_container.default.green }}, {{ colors.primary_container.default.blue }}, 0.3); - ''; - }; -} diff --git a/common/modules/matugen/templates/matugen-zen.nix b/common/modules/matugen/templates/matugen-zen.nix index cbb3df3..cd98991 100644 --- a/common/modules/matugen/templates/matugen-zen.nix +++ b/common/modules/matugen/templates/matugen-zen.nix @@ -1,4 +1,119 @@ { + xdg.configFile = { + "matugen/templates/zen-usercontent.css" = { + enable = true; + text = + # css + '' + /* Common variables affecting all pages */ + @-moz-document url-prefix("about:") { + :root { + --in-content-page-color: {{colors.secondary.default.hex}} !important; + --color-accent-primary: {{colors.primary.default.hex}} !important; + /* --color-accent-primary-hover: rgb(249, 217, 240) !important; + --color-accent-primary-active: rgb(245, 195, 219) !important; */ + background-color: {{colors.surface_container.default.hex}} !important; + --in-content-page-background: {{colors.surface_container.default.hex}} !important; + } + + } + + /* Variables and styles specific to about:newtab and about:home */ + @-moz-document url("about:newtab"), url("about:home") { + + :root { + --newtab-background-color: {{colors.surface_container.default.hex}} !important; + --newtab-background-color-secondary: {{colors.surface_container_high.default.hex}} !important; + --newtab-element-hover-color: {{colors.surface_container_high.default.hex}} !important; + --newtab-text-primary-color: {{colors.secondary.default.hex}} !important; + --newtab-wordmark-color: {{colors.secondary.default.hex}} !important; + --newtab-primary-action-background: {{colors.primary.default.hex}} !important; + } + + .icon { + color: {{colors.primary.default.hex}} !important; + } + + .card-outer:is(:hover, :focus, .active):not(.placeholder) .card-title { + color: {{colors.primary.default.hex}} !important; + } + } + + /* Variables and styles specific to about:preferences */ + @-moz-document url-prefix("about:preferences") { + :root { + --zen-colors-tertiary: {{colors.surface_container_low.default.hex}} !important; + --in-content-text-color: {{colors.secondary.default.hex}} !important; + --link-color: {{colors.primary.default.hex}} !important; + /* --link-color-hover: rgb(249, 217, 240) !important; */ + --zen-colors-primary: {{colors.surface_container_high.default.hex}} !important; + --in-content-box-background: {{colors.surface_container_high.default.hex}} !important; + --zen-primary-color: {{colors.primary.default.hex}} !important; + } + + button, + groupbox menulist { + background: {{colors.surface_container_high.default.hex}} !important; + color: {{colors.secondary.default.hex}} !important; + } + + .main-content { + background-color: {{colors.surface_container_lowest.default.hex}} !important; + } + } + + /* Variables and styles specific to about:addons */ + @-moz-document url-prefix("about:addons") { + :root { + --zen-dark-color-mix-base: {{colors.surface_container_low.default.hex}} !important; + --background-color-box: {{colors.surface_container.default.hex}} !important; + } + } + + /* Variables and styles specific to about:protections */ + @-moz-document url-prefix("about:protections") { + :root { + --zen-primary-color: {{colors.surface_container.default.hex}} !important; + --in-content-primary-button-text-color-hover: {{colors.secondary.default.hex}} !important; + --in-content-primary-button-background: {{colors.surface_container.default.hex}} !important; + --in-content-primary-button-text-color: {{colors.secondary.default.hex}} !important; + } + + .card { + background-color: {{colors.surface_container_high.default.hex}} !important; + } + } + /* Pane UI button visibility issue fix */ + #PanelUI-menu-button[open] .toolbarbutton-icon { + fill: {{colors.primary.default.hex}} !important; + } + } + + + img, canvas, video, .avatar, + [class*="avatar"], + [class*="ProfileAvatar"], + [style*="border-radius"] { + border-radius: 0 !important; + clip-path: none !important; + mask-image: none !important; + -webkit-mask-image: none !important; + } + + :not(svg):not(circle):not(ellipse):not(path) { + border-radius: 0 !important; + } + + :root { + --border-radius: 0px !important; + --radius: 0px !important; + --rounded-corner: 0px !important; + --avatar-radius: 0px !important; + --pfp-radius: 0px !important; + } + ''; + }; + }; xdg.configFile = { "matugen/templates/zen.css" = { enable = true; diff --git a/common/programs/firefox.nix b/common/programs/firefox.nix index b63fc8d..d393131 100644 --- a/common/programs/firefox.nix +++ b/common/programs/firefox.nix @@ -7,6 +7,7 @@ { programs.firefox = { enable = false; + package = pkgs.librewolf; policies = { DisableTelemetry = true; @@ -56,30 +57,20 @@ install_url = "https://addons.mozilla.org/firefox/downloads/latest/ublock-origin/latest.xpi"; private_browsing = true; }; - # "addon@darkreader.org" = { - # installation_mode = "force_installed"; - # install_url = "https://addons.mozilla.org/firefox/downloads/latest/darkreader/latest.xpi"; - # }; - } - // lib.optionalAttrs config.hyprland.enable { - "pywalfox@frewacom.org" = { + "addon@darkreader.org" = { + default_area = "menupanel"; installation_mode = "force_installed"; - install_url = "https://addons.mozilla.org/firefox/downloads/latest/pywalfox/latest.xpi"; + install_url = "https://addons.mozilla.org/firefox/downloads/latest/darkreader/latest.xpi"; + private_browsing = true; }; }; }; profiles.default = { settings = { - # Always start fresh, no tab restore - "browser.aboutConfig.showWarning" = false; - "browser.sessionstore.resume_from_crash" = false; - "browser.sessionstore.restore_on_demand" = false; "browser.sessionstore.max_tabs_undo" = 0; "browser.sessionstore.max_windows_undo" = 0; - # "userChrome.theme-material" = true; - # "browser.startup.page" = 1; # Blank page # "browser.newtabpage.enabled" = false; @@ -97,7 +88,6 @@ # Performance "gfx.webrender.all" = true; # Enable WebRender "layers.acceleration.enabled" = true; - # "dom.ipc.processCount" = 8; # Adjust based on CPU cores "browser.cache.disk.enable" = false; # Disable disk cache "browser.cache.memory.enable" = true; # Use memory cache "browser.cache.memory.capacity" = 1048576; # 1gb memory cache diff --git a/common/programs/zenBrowser.nix b/common/programs/zenBrowser.nix index 8227bc7..bee6d86 100644 --- a/common/programs/zenBrowser.nix +++ b/common/programs/zenBrowser.nix @@ -75,8 +75,8 @@ in ExtensionSettings = builtins.listToAttrs extensions; SearchEngines = { - Default = "DuckDuckGo"; - # Default = "Omnisearch"; + # Default = "DuckDuckGo"; + Default = "Omnisearch"; PreventInstalls = true; Remove = [ "Google" @@ -122,7 +122,7 @@ in xdg.configFile = { "userContent.css" = { - enable = true; + enable = false; text = # css '' -- cgit v1.3.1