[AGS] Bar: BT, Audio, SysInfo, Brightness
This commit is contained in:
@@ -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,
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user