From 33e1ab078501436b0d634b6f3f2f23687783894b Mon Sep 17 00:00:00 2001
From: 2 * r + 2 * t <61896496+soramanew@users.noreply.github.com>
Date: Wed, 2 Apr 2025 18:43:01 +1100
Subject: bar: embedded style

---
 src/modules/screencorners.tsx | 23 +++++++++++++++++++++++
 1 file changed, 23 insertions(+)

(limited to 'src/modules/screencorners.tsx')

diff --git a/src/modules/screencorners.tsx b/src/modules/screencorners.tsx
index d160349..4368b87 100644
--- a/src/modules/screencorners.tsx
+++ b/src/modules/screencorners.tsx
@@ -26,3 +26,26 @@ export default ({ monitor }: { monitor: Monitor }) => (
         </box>
     </window>
 );
+
+export const BarScreenCorners = ({ monitor }: { monitor: Monitor }) => (
+    <window
+        namespace="caelestia-screencorners"
+        monitor={monitor.id}
+        anchor={bind(bar.vertical).as(
+            v =>
+                Astal.WindowAnchor.TOP |
+                Astal.WindowAnchor.LEFT |
+                (v ? Astal.WindowAnchor.BOTTOM : Astal.WindowAnchor.RIGHT)
+        )}
+        visible={bind(bar.style).as(s => s === "embedded")}
+        setup={self =>
+            self.connect("size-allocate", () => self.get_window()?.input_shape_combine_region(new Cairo.Region(), 0, 0))
+        }
+    >
+        <box vertical={bind(bar.vertical)}>
+            <ScreenCorner place="topleft" />
+            <box expand />
+            <ScreenCorner place={bind(bar.vertical).as(v => (v ? "bottomleft" : "topright"))} />
+        </box>
+    </window>
+);
-- 
cgit v1.2.3-freya

