From 5818cb01b8ab7f3955fd0c2095e843f2d61939cc Mon Sep 17 00:00:00 2001
From: sudacode <suda@sudacode.com>
Date: Sun, 4 May 2025 16:14:32 -0700
Subject: [PATCH] update waybar to be 3 segments, transparent otherwise

---
 .../waybar/catppuccin-macchiato/config.jsonc  | 26 +++++++++++++++++--
 .config/waybar/catppuccin-macchiato/style.css | 19 +++++++++++---
 2 files changed, 40 insertions(+), 5 deletions(-)

diff --git a/.config/waybar/catppuccin-macchiato/config.jsonc b/.config/waybar/catppuccin-macchiato/config.jsonc
index 0815db4..9f18582 100644
--- a/.config/waybar/catppuccin-macchiato/config.jsonc
+++ b/.config/waybar/catppuccin-macchiato/config.jsonc
@@ -17,10 +17,12 @@
     "custom/firefox-scroll",
     "cava",
   ],
-  "modules-center": ["hyprland/window"],
+  // "modules-center": ["hyprland/window"],
+  "modules-center": ["custom/notification"],
   "modules-right": [
     "hyprland/scratchpad",
-    "idle_inhibitor",
+    // "idle_inhibitor",
+    // "custom/notification",
     "custom/updates",
     "custom/kernel",
     // "disk#ssd",
@@ -306,4 +308,24 @@
     "on-click": "playerctl -p firefox play-pause",
     "hide-empty-text": true,
   },
+  "custom/notification": {
+    "tooltip": true,
+    "format": "{icon}",
+    "format-icons": {
+      "notification": "<span foreground='red'><sup></sup></span>",
+      "none": "",
+      "dnd-notification": "<span foreground='red'><sup></sup></span>",
+      "dnd-none": "",
+      "inhibited-notification": "<span foreground='red'><sup></sup></span>",
+      "inhibited-none": "",
+      "dnd-inhibited-notification": "<span foreground='red'><sup></sup></span>",
+      "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,
+  },
 }
diff --git a/.config/waybar/catppuccin-macchiato/style.css b/.config/waybar/catppuccin-macchiato/style.css
index 3a729c2..ece9b6e 100644
--- a/.config/waybar/catppuccin-macchiato/style.css
+++ b/.config/waybar/catppuccin-macchiato/style.css
@@ -9,7 +9,7 @@
 }
 
 window#waybar {
-  background-color: @mantle;
+  background-color: transparent;
   color: @text;
   /* border-radius: 0.69em; */
 }
@@ -114,6 +114,12 @@ button:hover {
   color: @text;
 }
 
+.modules-left,
+.modules-right,
+.modules-center {
+  background-color: @mantle;
+}
+
 .modules-left > widget:first-child > #workspaces {
   margin-left: 0;
 }
@@ -254,7 +260,7 @@ label:focus {
   background-color: @yellow;
   color: @mantle;
   padding: 0 10px;
-  margin: 5px 1px;
+  margin: 5px 1px 5px 5px;
 }
 
 #custom-launcher {
@@ -274,7 +280,7 @@ label:focus {
   background-color: @blue;
   color: @crust;
   padding: 0 10px;
-  margin: 5px 1px;
+  margin: 5px 5px 5px 1px;
 }
 
 #battery.critical:not(.charging) {
@@ -306,3 +312,10 @@ label:focus {
   padding: 0 10px;
   margin: 5px 1px;
 }
+
+#custom-notification {
+  font-family: "JetBrainsMono Nerd Font";
+  padding: 5px;
+  background-color: transparent;
+  color: @maroon;
+}