flocon/home/programs/swaync.nix

65 lines
1.6 KiB
Nix
Raw Normal View History

{
pkgs,
lib,
...
}: let
inherit (lib) mkForce;
swayncStyle = pkgs.fetchurl {
url = "https://github.com/catppuccin/swaync/releases/download/v0.2.3/macchiato.css";
sha256 = "sha256-LMm6nWn1JPPgj5YpppwFG3lXTtXem5atlIvqrDxd0bM=";
};
in {
home.packages = [pkgs.procps];
services.swaync = {
enable = true;
style = swayncStyle;
settings = {
positionX = "right";
positionY = "top";
layer = "overlay";
control-center-layer = "top";
layer-shell = true;
cssPriority = "application";
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;
widgets = [
"title"
"dnd"
"mpris"
"notifications"
"volume"
];
widget-config = {
title = {
text = "Notifications";
clear-all-button = true;
button-text = "󰩹";
};
dnd = {
text = "Do Not Disturb";
};
mpris = {
blur = true;
};
volume = {
label = "󰓃";
show-per-app = false;
};
};
};
};
systemd.user.services.swaync = {
Install.WantedBy = mkForce ["graphical-session.target"];
Unit.ConditionEnvironment = mkForce "";
Unit.PartOf = lib.mkForce ["graphical-session.target"];
};
}