2024-09-09 00:22:14 +00:00
|
|
|
{
|
2024-09-13 01:50:53 +00:00
|
|
|
config,
|
|
|
|
lib,
|
|
|
|
...
|
|
|
|
}:
|
|
|
|
with lib; let
|
|
|
|
cfg = config.custom.services.swaync;
|
|
|
|
in {
|
|
|
|
options.custom.services.swaync.enable = mkOption {default = false;};
|
2024-09-09 00:22:14 +00:00
|
|
|
|
|
|
|
config.home-manager.users.${config.custom.username} = mkIf cfg.enable {
|
|
|
|
# https://github.com/ErikReider/SwayNotificationCenter
|
|
|
|
services.swaync = {
|
|
|
|
enable = true;
|
|
|
|
style = ./style.css;
|
|
|
|
|
|
|
|
# https://github.com/ErikReider/SwayNotificationCenter/blob/main/src/configSchema.json
|
|
|
|
settings = {
|
|
|
|
control-center-width = 750 / config.custom.scale;
|
|
|
|
control-center-height = config.custom.height / 2;
|
|
|
|
fit-to-screen = false;
|
|
|
|
hide-on-clear = true;
|
|
|
|
notification-2fa-action = false;
|
|
|
|
#// notification-inline-replies = true;
|
|
|
|
positionX = "center";
|
2024-12-11 02:09:24 +00:00
|
|
|
positionY = "bottom";
|
2024-09-09 00:22:14 +00:00
|
|
|
timeout-low = 5;
|
|
|
|
timeout = 5; # normal
|
|
|
|
timeout-critical = 0;
|
|
|
|
|
|
|
|
widgets = [
|
|
|
|
"notifications"
|
|
|
|
"backlight"
|
|
|
|
"inhibitors"
|
|
|
|
"dnd"
|
|
|
|
"title"
|
|
|
|
];
|
|
|
|
};
|
|
|
|
};
|
|
|
|
};
|
|
|
|
}
|