mirror of
https://github.com/tuxdotrs/tpanel.git
synced 2026-02-04 06:56:47 +05:30
feat: add multi-monitor support
This commit is contained in:
25
main.tsx
Normal file
25
main.tsx
Normal file
@@ -0,0 +1,25 @@
|
||||
import { For, This, createBinding } from "ags";
|
||||
import app from "ags/gtk4/app";
|
||||
import { Bar } from "./widgets/bar";
|
||||
import { Launcher } from "./widgets/launcher";
|
||||
import { Notifications } from "./widgets/notifications";
|
||||
import { ControlCenter } from "./widgets/control-center";
|
||||
import { WallpaperManager } from "./widgets/wallpaper-manager";
|
||||
|
||||
export const Main = () => {
|
||||
const monitors = createBinding(app, "monitors");
|
||||
|
||||
return (
|
||||
<For each={monitors}>
|
||||
{(monitor) => (
|
||||
<This this={app}>
|
||||
<Bar gdkmonitor={monitor} />
|
||||
<Launcher gdkmonitor={monitor} />
|
||||
<Notifications gdkmonitor={monitor} />
|
||||
<ControlCenter gdkmonitor={monitor} />
|
||||
<WallpaperManager gdkmonitor={monitor} />
|
||||
</This>
|
||||
)}
|
||||
</For>
|
||||
);
|
||||
};
|
||||
Reference in New Issue
Block a user