treewide: optionalize stylix.image option (#717)
Optionalize the stylix.image option when stylix.base16Scheme is set,
making the following Stylix configurations valid:
[
// Now it possible to set 'stylix.image = null', if
// stylix.base16Scheme is set.
{
base16Scheme = /* ... */;
}
// This configuration was already possible.
{
image = /* ... */;
}
// This configuration was already possible.
{
base16Scheme = /* ... */;
image = /* ... */;
}
]
Closes: https://github.com/danth/stylix/issues/200
Closes: https://github.com/danth/stylix/issues/442
Link: https://github.com/danth/stylix/pull/717
Co-authored-by: NAHO <90870942+trueNAHO@users.noreply.github.com>
Reviewed-by: NAHO <90870942+trueNAHO@users.noreply.github.com>
Tested-by: NAHO <90870942+trueNAHO@users.noreply.github.com>
Reviewed-by: Daniel Thwaites <danth@danth.me>
This commit is contained in:
parent
f121a142ab
commit
c8e4a0d218
19 changed files with 401 additions and 290 deletions
|
|
@ -4,16 +4,21 @@
|
|||
lib,
|
||||
...
|
||||
}:
|
||||
|
||||
let
|
||||
cfg = config.stylix.targets.feh;
|
||||
in
|
||||
{
|
||||
options.stylix.targets.feh.enable =
|
||||
config.lib.stylix.mkEnableTarget "the desktop background using Feh" true;
|
||||
options.stylix.targets.feh = {
|
||||
enable = config.lib.stylix.mkEnableTarget "the desktop background using Feh" (
|
||||
config.stylix.image != null
|
||||
);
|
||||
};
|
||||
|
||||
config.xsession.initExtra =
|
||||
lib.mkIf
|
||||
(
|
||||
config.stylix.enable
|
||||
&& config.stylix.targets.feh.enable
|
||||
&& cfg.enable
|
||||
&& (
|
||||
with config.xsession.windowManager;
|
||||
bspwm.enable
|
||||
|
|
|
|||
|
|
@ -4,16 +4,21 @@
|
|||
lib,
|
||||
...
|
||||
}:
|
||||
|
||||
let
|
||||
cfg = config.stylix.targets.feh;
|
||||
in
|
||||
{
|
||||
options.stylix.targets.feh.enable =
|
||||
config.lib.stylix.mkEnableTarget "the desktop background using Feh" true;
|
||||
options.stylix.targets.feh = {
|
||||
enable = config.lib.stylix.mkEnableTarget "the desktop background using Feh" (
|
||||
config.stylix.image != null
|
||||
);
|
||||
};
|
||||
|
||||
config.services.xserver.displayManager.sessionCommands =
|
||||
lib.mkIf
|
||||
(
|
||||
config.stylix.enable
|
||||
&& config.stylix.targets.feh.enable
|
||||
&& cfg.enable
|
||||
&& (with config.services.xserver.windowManager; xmonad.enable || i3.enable)
|
||||
)
|
||||
(
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue