Files
ags/widget/Bar.tsx
T
2025-03-12 15:40:34 +07:00

60 lines
1.4 KiB
TypeScript

import { App, Astal, Gtk, Gdk } from "astal/gtk3";
import {
PowerMenu,
Cpu,
BatteryLevel,
Ram,
Storage,
Workspaces,
// FocusedClient,
Time,
SysTray,
Media,
LauncherButton,
PowerMenuButton,
MediaPlayerButton,
Volume,
} from "./modules/export";
// import Wp from "gi://AstalWp";
// import { bind } from "astal";
export default function Bar(gdkmonitor: Gdk.Monitor) {
const { TOP, LEFT, RIGHT } = Astal.WindowAnchor;
// const speaker = Wp.get_default()?.audio.defaultSpeaker!;
return (
<>
<window
className="Bar"
name="Bar"
gdkmonitor={gdkmonitor}
exclusivity={Astal.Exclusivity.EXCLUSIVE}
anchor={TOP | LEFT | RIGHT}
application={App}
>
<centerbox>
<box hexpand halign={Gtk.Align.START} className="RoudedBlock">
<LauncherButton />
<Cpu />
<Ram />
<Storage />
{/*<FocusedClient />*/}
</box>
<box hexpand halign={Gtk.Align.CENTER} className="RoudedBlock">
<Workspaces />
</box>
<box hexpand halign={Gtk.Align.END} className="RoudedBlock">
<Volume />
<MediaPlayerButton />
<SysTray />
<BatteryLevel />
<Time />
<PowerMenuButton />
</box>
</centerbox>
</window>
<PowerMenu />
<Media />
</>
);
}