Waybar: better notifications

This commit is contained in:
Filippo Berto 2024-02-22 14:21:20 +01:00
parent 03f2250065
commit 4ca7df6298
No known key found for this signature in database
GPG key ID: FE98AE5EC52B1056

View file

@ -14,6 +14,7 @@ let
tertiary_background_hex = nix-rice.color.setAlphaRgba alpha colorPalette.primary.background; tertiary_background_hex = nix-rice.color.setAlphaRgba alpha colorPalette.primary.background;
}; };
}; };
swaync-client = "${pkgs.swaynotificationcenter}/bin/swaync-client";
in in
{ {
home.packages = [ pkgs.swaynotificationcenter ]; home.packages = [ pkgs.swaynotificationcenter ];
@ -42,8 +43,8 @@ in
"battery" "battery"
"battery#bat2" "battery#bat2"
"clock" "clock"
"tray"
"custom/notification" "custom/notification"
"tray"
]; ];
"custom/notification" = { "custom/notification" = {
@ -56,10 +57,10 @@ in
dnd-none = ""; dnd-none = "";
}; };
return-type = "json"; return-type = "json";
exec-if = "which swaync-client"; # exec-if = "which swaync-client";
exec = "swaync-client -swb"; exec = "${swaync-client} -swb";
on-click = "sleep 0.1 && swaync-client -t -sw"; on-click = "sleep 0.1 && ${swaync-client} -t -sw";
on-click-right = "sleep 0.1 && swaync-client -d -sw"; on-click-right = "sleep 0.1 && ${swaync-client} -d -sw";
escape = true; escape = true;
}; };