build(ags): init ags app
This commit is contained in:
parent
4078359635
commit
482efdc70f
7 changed files with 109 additions and 0 deletions
36
modules/programs/ags/widget/Bar.tsx
Normal file
36
modules/programs/ags/widget/Bar.tsx
Normal file
|
@ -0,0 +1,36 @@
|
|||
import { App, Astal, Gtk, Gdk } from "astal/gtk4"
|
||||
import { Variable } from "astal"
|
||||
|
||||
const time = Variable("").poll(1000, "date")
|
||||
|
||||
export default function Bar(gdkmonitor: Gdk.Monitor) {
|
||||
const { TOP, LEFT, RIGHT } = Astal.WindowAnchor
|
||||
|
||||
return <window
|
||||
visible
|
||||
cssClasses={["Bar"]}
|
||||
gdkmonitor={gdkmonitor}
|
||||
exclusivity={Astal.Exclusivity.EXCLUSIVE}
|
||||
anchor={TOP | LEFT | RIGHT}
|
||||
application={App}>
|
||||
<centerbox cssName="centerbox">
|
||||
<button
|
||||
onClicked="echo hello"
|
||||
hexpand
|
||||
halign={Gtk.Align.CENTER}
|
||||
>
|
||||
Welcome to AGS!
|
||||
</button>
|
||||
<box />
|
||||
<menubutton
|
||||
hexpand
|
||||
halign={Gtk.Align.CENTER}
|
||||
>
|
||||
<label label={time()} />
|
||||
<popover>
|
||||
<Gtk.Calendar />
|
||||
</popover>
|
||||
</menubutton>
|
||||
</centerbox>
|
||||
</window>
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue