From b5d5b8ca064d42cedbe8c5e09ae7976b54c20874 Mon Sep 17 00:00:00 2001 From: NAHO <90870942+trueNAHO@users.noreply.github.com> Date: Sun, 22 Oct 2023 20:24:34 +0200 Subject: [PATCH] Apply dark mode to Qutebrowser (#175) --- modules/qutebrowser/hm.nix | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/modules/qutebrowser/hm.nix b/modules/qutebrowser/hm.nix index 7420d6420..c7eb440ec 100644 --- a/modules/qutebrowser/hm.nix +++ b/modules/qutebrowser/hm.nix @@ -195,6 +195,13 @@ in { }; }; }; + webpage = let + isDark = config.stylix.polarity == "dark"; + in { + darkmode.enabled = lib.mkIf isDark (lib.mkDefault true); + preferred_color_scheme = lib.mkIf + isDark (lib.mkDefault config.stylix.polarity); + }; }; fonts = let