myputer specific changes
This commit is contained in:
parent
1d4189b040
commit
a448ce3f39
216 changed files with 544 additions and 24478 deletions
38
homes/modules/ags/widgets/bar.ts
Executable file
38
homes/modules/ags/widgets/bar.ts
Executable 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]()))
|
||||
}),
|
||||
})
|
||||
})
|
||||
Loading…
Add table
Add a link
Reference in a new issue