snowflake/home/ags/config/js/main.js
notohh 36bbb8603a
All checks were successful
flake check / check (push) Successful in 11m1s
fmt check / check (push) Successful in 1m6s
ags: init basic bar
2024-01-01 21:29:18 -05:00

32 lines
No EOL
596 B
JavaScript

import { Widget } from '../import.js';
import { Time } from './widgets/time.js'
const Start = () => Widget.Box({
hpack: "start",
children: []
})
const Center = () => Widget.Box({
children: []
})
const End = () => Widget.Box({
hpack: "end",
children: [
Time()
]
})
const Bar = (monitor) => Widget.Window({
monitor,
name: `bar-${monitor}`,
anchor: ['top', 'left', 'right'],
exclusivity: 'exclusive',
child: Widget.CenterBox({
startWidget: Start(),
centerWidget: Center(),
endWidget: End(),
}),
})
export {
Bar
}