blob: 63e7221e720359bcbca79d3c891c5d749dd51e42 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
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>
);
|