Skip to content

Commit

Permalink
feat: add even-darker
Browse files Browse the repository at this point in the history
  • Loading branch information
Louis Dalibard committed Dec 23, 2024
1 parent 66c7906 commit 78ac78b
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 3 deletions.
2 changes: 1 addition & 1 deletion modules/gnome/hm.nix
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ in {
# settings tile is removed. The value is still used by Epiphany to
# request dark mode for websites which support it.
color-scheme =
if config.stylix.polarity == "dark" || config.stylix.polarity == "darker"
if config.stylix.polarity == "dark" || config.stylix.polarity == "darker" || config.stylix.polarity == "even-darker"
then "prefer-dark"
else "default";

Expand Down
2 changes: 1 addition & 1 deletion modules/qutebrowser/hm.nix
Original file line number Diff line number Diff line change
Expand Up @@ -248,7 +248,7 @@ in {
};

webpage = let
isDark = config.stylix.polarity == "dark" || config.stylix.polarity == "darker";
isDark = config.stylix.polarity == "dark" || config.stylix.polarity == "darker" || config.stylix.polarity == "even-darker";
in {
darkmode.enabled = lib.mkIf isDark (lib.mkDefault true);

Expand Down
4 changes: 4 additions & 0 deletions palette-generator/Stylix/Palette.hs
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,7 @@ instance Species (String, Image PixelRGB8) (V.Vector LAB) where
"light" -> lightScheme
"dark" -> darkScheme
"darker" -> darkerScheme
"even-darker" -> evenDarkerScheme
_ -> error ("Invalid polarity: " ++ polarity)

{-
Expand All @@ -94,3 +95,6 @@ instance Species (String, Image PixelRGB8) (V.Vector LAB) where

darkerScheme
= lightnessError (V.fromList [5, 10, 15, 20, 70, 80, 95, 95]) 60

evenDarkerScheme
= lightnessError (V.fromList [2, 4, 8, 10, 70, 80, 95, 95]) 60
2 changes: 1 addition & 1 deletion stylix/palette.nix
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ let
in {
options.stylix = {
polarity = lib.mkOption {
type = lib.types.enum [ "either" "light" "dark" "darker" ];
type = lib.types.enum [ "either" "light" "dark" "darker" "even-darker" ];
default = "either";
description = ''
Use this option to force a light or dark theme.
Expand Down

0 comments on commit 78ac78b

Please sign in to comment.