From 8fab7d4b65cd16769d3ef48e44da3f8ed75582ed Mon Sep 17 00:00:00 2001
From: 2 * r + 2 * t <61896496+soramanew@users.noreply.github.com>
Date: Mon, 31 Mar 2025 23:02:52 +1100
Subject: feat: fake screen rounding

---
 src/modules/screencorners.tsx | 24 ++++++++++++++++++++++++
 1 file changed, 24 insertions(+)
 create mode 100644 src/modules/screencorners.tsx

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

diff --git a/src/modules/screencorners.tsx b/src/modules/screencorners.tsx
new file mode 100644
index 0000000..63e7221
--- /dev/null
+++ b/src/modules/screencorners.tsx
@@ -0,0 +1,24 @@
+import type { Monitor } from "@/services/monitors";
+import ScreenCorner from "@/widgets/screencorner";
+import { bind } from "astal/binding";
+import { Astal } from "astal/gtk3";
+import { bar } from "config";
+
+export default ({ monitor }: { monitor: Monitor }) => (
+    <window
+        namespace="caelestia-screencorners"
+        monitor={monitor.id}
+        anchor={bind(bar.vertical).as(
+            v =>
+                Astal.WindowAnchor.BOTTOM |
+                Astal.WindowAnchor.RIGHT |
+                (v ? Astal.WindowAnchor.TOP : Astal.WindowAnchor.LEFT)
+        )}
+    >
+        <box vertical={bind(bar.vertical)}>
+            <ScreenCorner place={bind(bar.vertical).as(v => (v ? "topright" : "bottomleft"))} />
+            <box expand />
+            <ScreenCorner place="bottomright" />
+        </box>
+    </window>
+);
-- 
cgit v1.2.3-freya

