snowflake/home/ags/config/js/main.js

36 lines
765 B
JavaScript
Raw Normal View History

import { Widget } from "../import.js";
import { Time } from "./widgets/time.js";
import { nixosLogo } from "./widgets/images/image.js";
import { Media } from "./widgets/music.js";
import { Workspaces } from "./widgets/hyprland.js";
2024-01-01 21:29:18 -05:00
const Start = () =>
Widget.Box({
2024-01-01 21:29:18 -05:00
hpack: "start",
2024-02-01 17:48:30 -05:00
children: [nixosLogo(), Workspaces()]
});
const Center = () =>
Widget.Box({
2024-02-01 17:48:30 -05:00
children: [Media()]
});
const End = () =>
Widget.Box({
2024-01-01 21:29:18 -05:00
hpack: "end",
2024-02-01 17:48:30 -05:00
children: [Time()]
});
2024-01-01 21:29:18 -05:00
const Bar = (monitor) =>
Widget.Window({
2024-01-01 21:29:18 -05:00
monitor,
2024-01-03 17:08:17 -05:00
name: `bar`,
anchor: ["top", "left", "right"],
exclusivity: "exclusive",
2024-01-01 21:29:18 -05:00
child: Widget.CenterBox({
startWidget: Start(),
centerWidget: Center(),
2024-02-01 17:48:30 -05:00
endWidget: End()
})
});
2024-01-01 21:29:18 -05:00
export { Bar };