feat: initial commit

This commit is contained in:
tux
2025-05-31 14:00:56 +05:30
commit ec117cea00
19 changed files with 603 additions and 0 deletions

45
widget/bar/index.tsx Normal file
View File

@@ -0,0 +1,45 @@
import { App, Astal, Gdk } from "astal/gtk4";
import { FocusedClient, WorkspaceButton } from "./workspace";
import { Battery } from "./battery";
import { Launcher } from "./launcher";
export const WINDOW_NAME = "bar";
export const Bar = (gdkmonitor: Gdk.Monitor) => {
const { TOP, LEFT, RIGHT } = Astal.WindowAnchor;
return (
<window
name={WINDOW_NAME}
visible
cssClasses={["Bar"]}
gdkmonitor={gdkmonitor}
exclusivity={Astal.Exclusivity.EXCLUSIVE}
anchor={TOP | LEFT | RIGHT}
application={App}
>
<centerbox>
<Start />
<Center />
<End />
</centerbox>
</window>
);
};
const Start = () => {
return (
<box spacing={15}>
<Launcher />
<WorkspaceButton />
</box>
);
};
const Center = () => {
return <FocusedClient />;
};
const End = () => {
return <Battery />;
};