treewide: move swaync styling out of module
This commit is contained in:
parent
2f4a8433c7
commit
6fef9e0a76
2 changed files with 31 additions and 37 deletions
|
@ -1,33 +1,41 @@
|
||||||
{
|
{
|
||||||
lib,
|
lib,
|
||||||
|
lib',
|
||||||
osConfig,
|
osConfig,
|
||||||
...
|
...
|
||||||
}: let
|
}: let
|
||||||
inherit (builtins) readFile;
|
styleCfg = osConfig.local.style;
|
||||||
in {
|
in {
|
||||||
config = lib.mkIf osConfig.local.modules.hyprland.enable {
|
config = lib.mkIf osConfig.local.modules.hyprland.enable {
|
||||||
services.swaync = {
|
services.swaync = lib.mkMerge [
|
||||||
enable = true;
|
{
|
||||||
style = readFile ./style.css;
|
enable = true;
|
||||||
settings = {
|
settings = {
|
||||||
positionX = "right";
|
positionX = "right";
|
||||||
positionY = "top";
|
positionY = "top";
|
||||||
layer = "overlay";
|
layer = "overlay";
|
||||||
control-center-layer = "top";
|
control-center-layer = "top";
|
||||||
layer-shell = true;
|
layer-shell = true;
|
||||||
cssPriority = "application";
|
cssPriority = "application";
|
||||||
control-center-margin-top = 0;
|
control-center-margin-top = 0;
|
||||||
control-center-margin-bottom = 0;
|
control-center-margin-bottom = 0;
|
||||||
control-center-margin-right = 0;
|
control-center-margin-right = 0;
|
||||||
control-center-margin-left = 0;
|
control-center-margin-left = 0;
|
||||||
notification-2fa-action = true;
|
notification-2fa-action = true;
|
||||||
notification-inline-replies = false;
|
notification-inline-replies = false;
|
||||||
notification-icon-size = 64;
|
notification-icon-size = 64;
|
||||||
notification-body-image-height = 100;
|
notification-body-image-height = 100;
|
||||||
notification-body-image-width = 200;
|
notification-body-image-width = 200;
|
||||||
};
|
};
|
||||||
};
|
}
|
||||||
# systemd.user.services.swaync.Service.Environment = "WAYLAND_DISPLAY=wayland-1";
|
|
||||||
|
(lib.mkIf styleCfg.enable {
|
||||||
|
style =
|
||||||
|
lib'.generateGtkColors lib styleCfg.scheme.palette
|
||||||
|
+ builtins.readFile ./style.css;
|
||||||
|
})
|
||||||
|
];
|
||||||
|
|
||||||
systemd.user.services.swaync.Unit.ConditionEnvironment = lib.mkForce "";
|
systemd.user.services.swaync.Unit.ConditionEnvironment = lib.mkForce "";
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,14 +0,0 @@
|
||||||
{
|
|
||||||
config,
|
|
||||||
lib,
|
|
||||||
lib',
|
|
||||||
...
|
|
||||||
}: let
|
|
||||||
cfg = config.local.style;
|
|
||||||
in {
|
|
||||||
config.home-manager.sharedModules = lib.mkIf cfg.enable [
|
|
||||||
{
|
|
||||||
services.swaync.style = lib'.generateGtkColors lib cfg.scheme.palette;
|
|
||||||
}
|
|
||||||
];
|
|
||||||
}
|
|
Loading…
Reference in a new issue