Files
nixy/home/system/waybar/swaync.nix
2025-08-28 23:11:34 +02:00

106 lines
2.6 KiB
Nix

{
services.swaync = {
enable = true;
settings = {
control-center-layer = "top";
control-center-width = 400;
control-center-height = 400;
control-center-margin-top = 10;
control-center-margin-bottom = 250;
control-center-margin-right = 10;
notification-window-width = 380;
notification-icon-size = 48;
notification-body-image-height = 80;
notification-body-image-width = 160;
notification-2fa-action = true;
notification-grouping = false;
image-visibility = "when-available";
transition-time = 100;
widgets = [ "dnd" "mpris" "notifications" ];
widget-config = {
inhibitors = {
text = "Inhibitors";
button-text = "Clear All";
clear-all-button = true;
};
title = {
text = "Notifications";
clear-all-button = true;
button-text = "Clear All";
};
dnd = { text = "Do Not Disturb"; };
mpris = {
image-size = 64;
blur = true;
};
};
};
style = ''
.notification,
.notification.low,
.notification.normal,
.notification.critical,
.notification-default-action,
.notification-default-action:hover,
.notification-default-action:active,
.notification-row:focus,
.notification-group:focus,
.notification-group.collapsed .notification-row .notification,
.control-center .notification-row .notification-background,
.control-center .notification-row .notification-background:hover,
.control-center .notification-row .notification-background:active {
background: transparent;
border: none;
outline: none;
box-shadow: none;
margin: 0;
padding: 0;
}
.control-center {
background: @base00;
border: 1px solid @base0D;
color: @base05;
padding: 5px;
border-radius: 15px;
}
.widget-body, .widget-mpris, .widget-dnd, .widget-inhibitors {
margin: 4px 5px;
}
.notification-content {
border-radius: 12px;
padding: 10px;
margin: 8px;
}
.notification-title {
font-weight: bold;
color: @base05;
}
.close-button {
margin: 6px;
padding: 3px;
border-radius: 100px;
background-color: transparent;
border: 1px solid transparent;
}
.close-button:hover {
background-color: @base0C;
}
.close-button:active {
background-color: @base0C;
color: @base00;
}
'';
};
}