yes
This commit is contained in:
parent
c21c00e9cf
commit
564f9963e1
@ -47,11 +47,11 @@ If you only set a wallpaper, Stylix will use a
|
||||
to create a color scheme. The quality of these schemes can vary, but more
|
||||
colorful images tend to have better results.
|
||||
|
||||
You can force a light or dark scheme using the polarity option:
|
||||
You can force a light or dark scheme using the `polarity.force` option:
|
||||
|
||||
```nix
|
||||
{
|
||||
stylix.polarity = "dark";
|
||||
stylix.force.polarity = "dark";
|
||||
}
|
||||
```
|
||||
|
||||
|
@ -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"
|
||||
if config.stylix.polarity.force == "dark"
|
||||
then "prefer-dark"
|
||||
else "default";
|
||||
|
||||
|
@ -1,10 +1,16 @@
|
||||
{ config, lib, ... }:
|
||||
{
|
||||
config,
|
||||
lib,
|
||||
...
|
||||
}: {
|
||||
options.stylix.targets.kubecolor.enable = config.lib.stylix.mkEnableTarget "kubecolor" true;
|
||||
|
||||
config = lib.mkIf config.stylix.targets.kubecolor.enable {
|
||||
programs.kubecolor.settings = {
|
||||
preset = if config.stylix.polarity == "either" then "" else "${config.stylix.polarity}";
|
||||
preset =
|
||||
if config.stylix.polarity.force == "either"
|
||||
then ""
|
||||
else "${config.stylix.polarity.force}";
|
||||
theme = {
|
||||
base = {
|
||||
info = "fg=${config.lib.stylix.colors.withHashtag.base05-hex}";
|
||||
|
@ -248,13 +248,13 @@ in {
|
||||
};
|
||||
|
||||
webpage = let
|
||||
isDark = config.stylix.polarity == "dark";
|
||||
isDark = config.stylix.polarity.force == "dark";
|
||||
in {
|
||||
darkmode.enabled = lib.mkIf isDark (lib.mkDefault true);
|
||||
|
||||
preferred_color_scheme =
|
||||
lib.mkIf
|
||||
isDark (lib.mkDefault config.stylix.polarity);
|
||||
isDark (lib.mkDefault config.stylix.polarity.force);
|
||||
};
|
||||
};
|
||||
|
||||
|
@ -1,22 +1,26 @@
|
||||
{ config, lib, ... }:
|
||||
|
||||
let
|
||||
cfg = config.stylix.iconTheme;
|
||||
inherit (config.stylix) polarity;
|
||||
{
|
||||
config,
|
||||
lib,
|
||||
...
|
||||
}: let
|
||||
cfg = config.stylix.iconTheme;
|
||||
inherit (config.stylix) polarity;
|
||||
in {
|
||||
imports = [ ../icon.nix ];
|
||||
config = lib.mkIf (config.stylix.enable && cfg.enable) {
|
||||
gtk = {
|
||||
iconTheme = {
|
||||
inherit (cfg) package;
|
||||
name = builtins.head (lib.filter (x: null != x) [
|
||||
({
|
||||
inherit (cfg) dark light;
|
||||
}."${polarity}" or null)
|
||||
cfg.dark
|
||||
cfg.light
|
||||
]);
|
||||
};
|
||||
};
|
||||
};
|
||||
imports = [../icon.nix];
|
||||
config = lib.mkIf (config.stylix.enable && cfg.enable) {
|
||||
gtk = {
|
||||
iconTheme = {
|
||||
inherit (cfg) package;
|
||||
name = builtins.head (lib.filter (x: null != x) [
|
||||
({
|
||||
inherit (cfg) dark light;
|
||||
}
|
||||
."${polarity.force}"
|
||||
or null)
|
||||
cfg.dark
|
||||
cfg.light
|
||||
]);
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user