Stylix : Add forceWhiteText switch.

This commit is contained in:
Dmitry Voronin 2024-05-07 16:12:07 +03:00
parent 57cd17bc7d
commit 2b1ca4f29a
Signed by: voronind
SSH key fingerprint: SHA256:3kBb4iV2ahufEBNq+vFbUe4QYfHt98DHQjN7QaptY9k
2 changed files with 13 additions and 13 deletions

View file

@ -1,10 +1,11 @@
{ pkgs, config, wallpaper, ... }: { { pkgs, config, wallpaper, ... }: let
forceWhiteText = false;
in {
environment.etc.wallpaper.source = wallpaper.path; environment.etc.wallpaper.source = wallpaper.path;
stylix = { stylix = {
image = wallpaper.path; image = wallpaper.path;
autoEnable = true; autoEnable = true;
polarity = "dark"; polarity = "dark";
# base16Scheme = "${pkgs.base16-schemes}/share/themes/gruvbox-dark-hard.yaml";
opacity = { opacity = {
applications = 0.85; applications = 0.85;
terminal = 0.85; terminal = 0.85;
@ -37,5 +38,10 @@
name = "Noto Color Emoji"; name = "Noto Color Emoji";
}; };
}; };
override = if forceWhiteText then {
base04 = "ffffff";
base05 = "ffffff";
base06 = "ffffff";
} else {};
}; };
} }

View file

@ -1,17 +1,11 @@
{ config, ... }: let { config, ... }: {
forceWhiteText = false;
in {
color = { color = {
bg = { bg = {
dark = config.lib.stylix.colors.base00; dark = config.lib.stylix.colors.base00;
light = config.lib.stylix.colors.base07; light = config.lib.stylix.colors.base07;
regular = config.lib.stylix.colors.base01; regular = config.lib.stylix.colors.base01;
}; };
fg = if forceWhiteText then { fg = {
dark = "ffffff";
light = "ffffff";
regular = "ffffff";
} else {
dark = config.lib.stylix.colors.base04; dark = config.lib.stylix.colors.base04;
light = config.lib.stylix.colors.base06; light = config.lib.stylix.colors.base06;
regular = config.lib.stylix.colors.base05; regular = config.lib.stylix.colors.base05;
@ -53,9 +47,9 @@ in {
border-g = config.lib.stylix.colors.base01-rgb-g; border-g = config.lib.stylix.colors.base01-rgb-g;
border-r = config.lib.stylix.colors.base01-rgb-r; border-r = config.lib.stylix.colors.base01-rgb-r;
fg-b = if forceWhiteText then 255 else config.lib.stylix.colors.base06-rgb-b; fg-b = config.lib.stylix.colors.base06-rgb-b;
fg-g = if forceWhiteText then 255 else config.lib.stylix.colors.base06-rgb-g; fg-g = config.lib.stylix.colors.base06-rgb-g;
fg-r = if forceWhiteText then 255 else config.lib.stylix.colors.base06-rgb-r; fg-r = config.lib.stylix.colors.base06-rgb-r;
}; };
font = { font = {