mirror of
https://github.com/danth/stylix
synced 2024-11-22 20:23:15 +00:00
Set GNOME background for both modes 💄
Otherwise, the default wallpaper is used for the other mode. Ideally we would support setting two wallpapers and two colourschemes, however that would clash with the other desktop environments which don't have a toggle. Perhaps it's something to think about for the future?
This commit is contained in:
parent
921ff2a2bb
commit
faace1bdc2
1 changed files with 16 additions and 20 deletions
|
@ -1,28 +1,24 @@
|
||||||
{ pkgs, config, lib, ... }:
|
{ pkgs, config, lib, ... }:
|
||||||
|
|
||||||
|
with lib;
|
||||||
|
|
||||||
{
|
{
|
||||||
options.stylix.targets.gnome.enable =
|
options.stylix.targets.gnome.enable =
|
||||||
config.lib.stylix.mkEnableTarget "GNOME" true;
|
config.lib.stylix.mkEnableTarget "GNOME" true;
|
||||||
|
|
||||||
config = lib.mkIf config.stylix.targets.gnome.enable {
|
config = mkIf config.stylix.targets.gnome.enable {
|
||||||
home-manager.sharedModules =
|
home-manager.sharedModules = [{
|
||||||
if config.stylix.polarity == "dark"
|
|
||||||
then [{
|
|
||||||
dconf.settings."org/gnome/desktop/background" = {
|
|
||||||
color-shading-type = "solid";
|
|
||||||
picture-options = "zoom";
|
|
||||||
picture-uri-dark = "file://${config.stylix.image}";
|
|
||||||
};
|
|
||||||
dconf.settings."org/gnome/desktop/interface" = {
|
|
||||||
color-scheme = "prefer-dark";
|
|
||||||
};
|
|
||||||
}]
|
|
||||||
else [{
|
|
||||||
dconf.settings."org/gnome/desktop/background" = {
|
dconf.settings."org/gnome/desktop/background" = {
|
||||||
color-shading-type = "solid";
|
color-shading-type = "solid";
|
||||||
picture-options = "zoom";
|
picture-options = "zoom";
|
||||||
picture-uri = "file://${config.stylix.image}";
|
picture-uri = "file://${config.stylix.image}";
|
||||||
|
picture-uri-dark = "file://${config.stylix.image}";
|
||||||
};
|
};
|
||||||
|
|
||||||
|
dconf.settings."org/gnome/desktop/interface".color-scheme =
|
||||||
|
if config.stylix.polarity == "dark"
|
||||||
|
then "prefer-dark"
|
||||||
|
else "default";
|
||||||
}];
|
}];
|
||||||
|
|
||||||
# As Stylix is controlling the wallpaper, there is no need for this
|
# As Stylix is controlling the wallpaper, there is no need for this
|
||||||
|
|
Loading…
Reference in a new issue