summaryrefslogtreecommitdiff
path: root/src/modules/screencorners.tsx
diff options
context:
space:
mode:
Diffstat (limited to 'src/modules/screencorners.tsx')
-rw-r--r--src/modules/screencorners.tsx24
1 files changed, 24 insertions, 0 deletions
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>
+);