refactor: move system info to control center

This commit is contained in:
tux
2025-09-26 03:50:07 +05:30
parent b745b16ca5
commit be1f269fff
12 changed files with 207 additions and 98 deletions

View File

@@ -1,12 +1,8 @@
import { Astal, Gdk } from "ags/gtk4";
import app from "ags/gtk4/app";
import { Battery } from "./battery";
import { CPU } from "./cpu";
import { GPU } from "./gpu";
import { Launcher } from "./launcher";
import { Network } from "./network";
import { Profile } from "./profile";
import { Tailscale } from "./tailscale";
import { Time } from "./time";
import { Tray } from "./tray";
import { WorkspaceButton } from "./workspace";
@@ -14,7 +10,7 @@ import { WorkspaceButton } from "./workspace";
export const WINDOW_NAME = "bar";
export const Bar = (gdkmonitor: Gdk.Monitor) => {
const { TOP, LEFT, RIGHT } = Astal.WindowAnchor;
const { TOP } = Astal.WindowAnchor;
return (
<window
@@ -23,16 +19,15 @@ export const Bar = (gdkmonitor: Gdk.Monitor) => {
cssClasses={["Bar"]}
gdkmonitor={gdkmonitor}
exclusivity={Astal.Exclusivity.EXCLUSIVE}
anchor={TOP | LEFT | RIGHT}
anchor={TOP}
widthRequest={1200}
application={app}
>
<centerbox>
<box spacing={10} $type="start">
<Launcher windowName="launcher" icon="nix-symbolic" />
<CPU />
<GPU />
<Profile />
<Tailscale />
<Network />
<Battery />
</box>
<box spacing={10} $type="center">
@@ -40,8 +35,6 @@ export const Bar = (gdkmonitor: Gdk.Monitor) => {
</box>
<box spacing={10} $type="end">
<Network />
<Battery />
<Tray />
<Time />
<Launcher windowName="control-center" icon="fa-ghost-symbolic" />