From 9b61203506c9f8960daeae50184d36170990f8b5 Mon Sep 17 00:00:00 2001 From: Nathan McCarty Date: Sat, 17 Jun 2023 00:09:53 -0400 Subject: [PATCH] Add Notifications to waybar --- home-manager/linux/programs/hyprland.nix | 29 ++++++++++++++++++++++++ 1 file changed, 29 insertions(+) diff --git a/home-manager/linux/programs/hyprland.nix b/home-manager/linux/programs/hyprland.nix index 997e0ef..74a4111 100644 --- a/home-manager/linux/programs/hyprland.nix +++ b/home-manager/linux/programs/hyprland.nix @@ -322,6 +322,7 @@ in with lib; { "memory" # "temperature" "tray" + "custom/notification" "clock" # "custom/power" ]; @@ -390,6 +391,28 @@ in with lib; { playing = "▶"; }; }; + "custom/notification" = { + tooltip = false; + format = "{icon}"; + format-icons = { + notification = ""; + none = ""; + dnd-notification = ""; + dnd-none = ""; + inhibited-notification = + ""; + inhibited-none = ""; + dnd-inhibited-notification = + ""; + dnd-inhibited-none = ""; + }; + return-type = "json"; + exec-if = "which swaync-client"; + exec = "swaync-client -swb"; + on-click = "swaync-client -t -sw"; + on-click-right = "swaync-client -d -sw"; + escape = true; + }; }; }; style = '' @@ -536,6 +559,12 @@ in with lib; { color: black; } + #custom-notification { + background-color: #FA8BFF; + background-image: linear-gradient(45deg, #2BD2FF 0%, #2BD2FF 52%, #2BD2FF 90%); + color: black; + } + #memory { background-color: #FA8BFF; background-image: linear-gradient(45deg, #2BD2FF 0%, #2BD2FF 52%, #2BD2FF 90%);