feat: add multi-monitor support

This commit is contained in:
tux
2025-12-29 21:47:59 +05:30
parent f46e52d427
commit b41e5706e1
8 changed files with 44 additions and 17 deletions

View File

@@ -5,10 +5,11 @@ import { Header } from "./header";
import { NotificationList } from "./notification-list";
import { SlidingControls } from "./sliding-controls";
import { SystemInfo } from "./system-info";
import { onCleanup } from "ags";
export const WINDOW_NAME = "control-center";
export const ControlCenter = (gdkmonitor: Gdk.Monitor) => {
export const ControlCenter = ({ gdkmonitor }: { gdkmonitor: Gdk.Monitor }) => {
const { TOP, BOTTOM, RIGHT } = Astal.WindowAnchor;
const { VERTICAL } = Gtk.Orientation;
@@ -20,6 +21,7 @@ export const ControlCenter = (gdkmonitor: Gdk.Monitor) => {
application={app}
keymode={Astal.Keymode.ON_DEMAND}
anchor={TOP | BOTTOM | RIGHT}
$={(self) => onCleanup(() => self.destroy())}
>
<Gtk.EventControllerKey onKeyPressed={onKey} />
<box vexpand orientation={VERTICAL} spacing={20}>