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

43 lines
815 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-01-03 14:10:19 -05:00
children: [
nixosLogo(),
Workspaces(),
],
});
const Center = () =>
Widget.Box({
2024-01-03 17:08:17 -05:00
children: [
Media(),
],
});
const End = () =>
Widget.Box({
2024-01-01 21:29:18 -05:00
hpack: "end",
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(),
endWidget: End(),
2024-01-01 21:29:18 -05:00
}),
});
2024-01-01 21:29:18 -05:00
export { Bar };