From 37eef2a11b66d3f2b69969a7e18d1996f154aaa3 Mon Sep 17 00:00:00 2001 From: Shihaam Abdul Rahman Date: Wed, 23 Sep 2026 00:59:38 +0500 Subject: [PATCH] notifcaitons --- config/waybar/config | 66 +++++++++++++++++++++++++++++++++++++++++ config/waybar/style.css | 20 +++++++++++++ 2 files changed, 86 insertions(+) diff --git a/config/waybar/config b/config/waybar/config index 282bf2d..2d586cf 100644 --- a/config/waybar/config +++ b/config/waybar/config @@ -33,6 +33,7 @@ "custom/ibus", "tray", "clock", + "custom/notification", "custom/power" ], @@ -265,6 +266,27 @@ "show-passive-items": true }, + "custom/notification": { + "format": "{icon}", + "format-icons": { + "notification": "󰂚", + "none": "󰂜", + "dnd-notification": "󰂛", + "dnd-none": "󰂛", + "inhibited-notification": "󰂚", + "inhibited-none": "󰂜", + "dnd-inhibited-notification": "󰂛", + "dnd-inhibited-none": "󰂛" + }, + "return-type": "json", + "exec": "swaync-client -swb", + "exec-if": "which swaync-client", + "on-click": "swaync-client -t -sw", + "on-click-right": "swaync-client -d -sw", + "escape": true, + "tooltip": true + }, + "custom/power": { "format": "⏻", "on-click": "$HOME/.config/waybar/scripts/power-menu.sh", @@ -294,6 +316,7 @@ "battery", "tray", "clock", + "custom/notification", "custom/power" ], @@ -421,6 +444,27 @@ "show-passive-items": true }, + "custom/notification": { + "format": "{icon}", + "format-icons": { + "notification": "󰂚", + "none": "󰂜", + "dnd-notification": "󰂛", + "dnd-none": "󰂛", + "inhibited-notification": "󰂚", + "inhibited-none": "󰂜", + "dnd-inhibited-notification": "󰂛", + "dnd-inhibited-none": "󰂛" + }, + "return-type": "json", + "exec": "swaync-client -swb", + "exec-if": "which swaync-client", + "on-click": "swaync-client -t -sw", + "on-click-right": "swaync-client -d -sw", + "escape": true, + "tooltip": true + }, + "custom/power": { "format": "⏻", "on-click": "$HOME/.config/waybar/scripts/power-menu.sh", @@ -449,6 +493,7 @@ "battery", "tray", "clock", + "custom/notification", "custom/power" ], @@ -567,6 +612,27 @@ "show-passive-items": true }, + "custom/notification": { + "format": "{icon}", + "format-icons": { + "notification": "󰂚", + "none": "󰂜", + "dnd-notification": "󰂛", + "dnd-none": "󰂛", + "inhibited-notification": "󰂚", + "inhibited-none": "󰂜", + "dnd-inhibited-notification": "󰂛", + "dnd-inhibited-none": "󰂛" + }, + "return-type": "json", + "exec": "swaync-client -swb", + "exec-if": "which swaync-client", + "on-click": "swaync-client -t -sw", + "on-click-right": "swaync-client -d -sw", + "escape": true, + "tooltip": true + }, + "custom/power": { "format": "⏻", "on-click": "$HOME/.config/waybar/scripts/power-menu.sh", diff --git a/config/waybar/style.css b/config/waybar/style.css index a741132..67a745f 100644 --- a/config/waybar/style.css +++ b/config/waybar/style.css @@ -98,6 +98,7 @@ tooltip label { #custom-weather, #custom-vpn, #custom-ibus, +#custom-notification, #custom-monitor-brightness { margin: 4px 2px; padding: 0 12px; @@ -121,6 +122,7 @@ tooltip label { #custom-weather:hover, #custom-vpn:hover, #custom-ibus:hover, +#custom-notification:hover, #custom-monitor-brightness:hover { background: #383838; box-shadow: 0 2px 6px rgba(0, 0, 0, 0.4); @@ -311,6 +313,24 @@ tooltip label { border-radius: 6px; } +/* ============= Notifications ============= */ +#custom-notification { + color: #B0B0B0; +} + +/* swaync sets the class from its --swaybar-format output */ +#custom-notification.notification, +#custom-notification.inhibited-notification { + color: #90CAF9; +} + +#custom-notification.dnd-none, +#custom-notification.dnd-notification, +#custom-notification.dnd-inhibited-none, +#custom-notification.dnd-inhibited-notification { + color: #CF6679; +} + /* ============= Power Button ============= */ #custom-power { margin: 4px 8px 4px 2px;