From 34e66067912f871cdda7612b01371eaa71742e44 Mon Sep 17 00:00:00 2001 From: matt1432 Date: Wed, 20 Nov 2024 09:52:45 -0500 Subject: [PATCH] feat(firefox): make corner border depend on hyprland rounding --- homeManagerModules/firefox/custom-css.nix | 8 ++------ homeManagerModules/firefox/default.nix | 8 ++++---- 2 files changed, 6 insertions(+), 10 deletions(-) diff --git a/homeManagerModules/firefox/custom-css.nix b/homeManagerModules/firefox/custom-css.nix index 75aa063b..552f9952 100644 --- a/homeManagerModules/firefox/custom-css.nix +++ b/homeManagerModules/firefox/custom-css.nix @@ -1,4 +1,4 @@ -hostName: +rounding: # css '' /* Hide unused menu rows */ @@ -101,11 +101,7 @@ hostName: :root:not([chromehidden~="toolbar"]) #PanelUI-menu-button[open]>.toolbarbutton-badge-stack { width: unset !important; - border-top-left-radius: ${ - if hostName == "wim" - then "18" - else "0" - }px !important; + border-top-left-radius: ${toString rounding}px !important; } :root:not([chromehidden~="toolbar"]) #PanelUI-menu-button>stack { diff --git a/homeManagerModules/firefox/default.nix b/homeManagerModules/firefox/default.nix index d8896db4..22bd6438 100644 --- a/homeManagerModules/firefox/default.nix +++ b/homeManagerModules/firefox/default.nix @@ -1,12 +1,12 @@ self: { - osConfig, + config, pkgs, ... }: let - inherit (osConfig.networking) hostName; - inherit (self.legacyPackages.${pkgs.system}) firefoxAddons; + rounding = (config.wayland.windowManager.hyprland.settings.decoration.rounding or 2) - 2; + firefox-gx = pkgs.callPackage ./gx-theme.nix { inherit (self.inputs) firefox-gx-src; inherit (import "${self}/lib" {}) mkVersion; @@ -28,7 +28,7 @@ in { userChrome = '' @import url("file://${firefox-gx}/chrome/userChrome.css"); - ${import ./custom-css.nix hostName} + ${import ./custom-css.nix rounding} ''; settings = {