added end-4's ags config

This commit is contained in:
Emile Clark-Boman 2024-11-11 10:21:22 +10:00
parent 4fcc76a32c
commit 41595493a3
180 changed files with 23456 additions and 13 deletions

View file

@ -0,0 +1,21 @@
const date = Variable('', {
poll: [1000, 'date'],
})
const Bar = (monitor = 0) => Widget.Window({
monitor,
name: 'bar${monitor}',
anchor: ['top', 'left', 'right'],
child: Widget.Label({ label: date.bind() }),
})
App.config({
style: "./style.css",
// icons: "./assets",
windows: [
Bar()
]
// gtkTheme: "Adwaita-dark",
// cursorTheme: "Qogir",
// iconTheme: "MoreWaita",[]
})

View file

@ -0,0 +1,38 @@
import options from "options"p
const { start, center, end } = options.bar.layout
// place all your bar widgets in here
const widgets = {
expander: () => Widget.Box({ expand: true}),
}
//export type BarWidget = keyof typeof widget;
export default (monitor: number) => Widget.Window({
monitor,
class_name: "bar",
name: "bar-${monitor}",
// anchor: position.bind().as(pos => [pos, "left", "right"]),
anchor: ["top", "left", "right"],
child: Widget.CenterBox({
// ensure bar is shown
css: "min-width: 2px; min-height: 2px;"
startWidget: Widget.Box({
hexpand: true,
// map all start widgets to be childen
childen: start.bind().as(s => s.map(w => widgets[w]()))
}),
centerWidget: Widget.Box({
hpack: "center",
// map all center widgets to be childen
childen: center.bind().as(c => c.map(w => widgets[w]()))
}),
endWidget: Widget.Box({
hexpand: true
// map all end widgets to be childen
childen: end.bind().as(e => e.map(w => widgets[w]()))
}),
})
})