nixos-config/modules/home/swaync.nix

77 lines
1.9 KiB
Nix

{ pkgs, ... }:
with pkgs.lib.nix-rice;
let strPalette = palette.toRGBHex pkgs.rice.colorPalette;
in {
services.swaync = {
enable = true;
settings = {
positionX = "right";
positionY = "top";
layer = "overlay";
control-center-layer = "top";
layer-shell = true;
cssPriority = "application";
control-center-height = 600;
fit-to-screen = false;
# control-center-margin-top = 0;
# control-center-margin-bottom = 0;
# control-center-margin-right = 0;
# control-center-margin-left = 0;
notification-2fa-action = true;
notification-inline-replies = false;
notification-icon-size = 64;
notification-body-image-height = 100;
notification-body-image-width = 200;
image-visibility = "when-available";
widgets = [
"inhibitors"
"dnd"
"notifications"
];
widget-config = {
inhibitors = {
"text" = "Inhibitors";
"button-text" = "Clear All";
"clear-all-button" = true;
};
title = {
"text" = "Notifications";
"clear-all-button" = false;
"button-text" = "Clear All";
};
dnd = {
"text" = "Do Not Disturb";
};
label = {
"max-lines" = 5;
"text" = "Label Text";
};
};
};
style =
''
.control-center {
background: ${strPalette.normal.background};
border-radius: ${toString pkgs.rice.corner-radius}px;
padding: 6px;
margin: 6px 12px;
border: 2px solid ${strPalette.normal.cyan};
color: ${strPalette.normal.white};
}
.notification-row {
outline: none;
}
.notification {
border-radius: ${toString pkgs.rice.corner-radius}px;
margin: 6px 12px;
box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.3), 0 1px 3px 1px rgba(0, 0, 0, 0.7),
0 2px 6px 2px rgba(0, 0, 0, 0.3);
padding: 6px;
}
'';
};
}