Files
nix-files/packages/ags/example/ts-starter-config/main.ts
2024-10-31 10:33:46 +01:00

27 lines
569 B
TypeScript

const time = Variable('', {
poll: [1000, function() {
return Date().toString();
}],
});
const Bar = (monitor: number) => Widget.Window({
monitor,
name: `bar${monitor}`,
anchor: ['top', 'left', 'right'],
exclusivity: 'exclusive',
child: Widget.CenterBox({
start_widget: Widget.Label({
hpack: 'center',
label: 'Welcome to AGS!',
}),
end_widget: Widget.Label({
hpack: 'center',
label: time.bind(),
}),
}),
});
App.config({
windows: [Bar(0)],
});