[AGS] Bar: BT, Audio, SysInfo, Brightness

This commit is contained in:
2025-04-23 20:04:48 +02:00
parent 69484fc302
commit e93e051094
26 changed files with 825 additions and 223 deletions

View File

@@ -3,40 +3,55 @@ import Hyprland from "./modules/Hyprland";
import Calendar from "./modules/Calendar";
import QuickView from "./modules/QuickView";
import SystemInfo from "./modules/SystemInfo";
import { CenterBox } from "astal/gtk4/widget";
const Bar = (gdkmonitor: Gdk.Monitor) => {
const { TOP, LEFT, RIGHT } = Astal.WindowAnchor;
return (
<window gdkmonitor={gdkmonitor}
<window
gdkmonitor={gdkmonitor}
cssClasses={["Bar"]}
exclusivity={Astal.Exclusivity.EXCLUSIVE}
anchor={TOP | LEFT | RIGHT}
visible
application={App}
child={
<box orientation={Gtk.Orientation.HORIZONTAL}>
<box hexpand halign={Gtk.Align.START} cssClasses={["BarLeft"]}>
<Calendar.Time />
<SystemInfo.SystemInfo />
<Hyprland.Workspace />
</box>
<Hyprland.ActiveWindow />
<box hexpand halign={Gtk.Align.END} cssClasses={["BarRight"]}>
<Hyprland.SysTray />
<QuickView.QuickView />
</box>
</box>
}>
</window>
<CenterBox
orientation={Gtk.Orientation.HORIZONTAL}
start_widget={
<box
hexpand
halign={Gtk.Align.START}
cssClasses={["BarLeft"]}
>
<Calendar.Time />
<SystemInfo.SystemInfo />
<Hyprland.Workspace />
</box>
}
centerWidget={<Hyprland.ActiveWindow />}
endWidget={
<box
hexpand
halign={Gtk.Align.END}
cssClasses={["BarRight"]}
>
<Hyprland.SysTray />
<QuickView.QuickView />
</box>
}
></CenterBox>
}
></window>
);
}
};
const cliHandler = ( args: string[] ): string => {
return 'Not implemented';
}
const cliHandler = (args: string[]): string => {
return "Not implemented";
};
export default {
Bar,
cliHandler
cliHandler,
};