diff options
| author | 2025-03-02 12:14:41 +0300 | |
|---|---|---|
| committer | 2025-03-02 12:14:41 +0300 | |
| commit | 47602a7cb4a5f3f63e5c812b95ac66004469dadc (patch) | |
| tree | 15a39dc6bdb6cd6f1d86b1c2821fcce41a07f55b /widget | |
| download | ags-config-47602a7cb4a5f3f63e5c812b95ac66004469dadc.tar.gz ags-config-47602a7cb4a5f3f63e5c812b95ac66004469dadc.tar.bz2 ags-config-47602a7cb4a5f3f63e5c812b95ac66004469dadc.tar.lz ags-config-47602a7cb4a5f3f63e5c812b95ac66004469dadc.tar.xz ags-config-47602a7cb4a5f3f63e5c812b95ac66004469dadc.tar.zst ags-config-47602a7cb4a5f3f63e5c812b95ac66004469dadc.zip | |
feat: initial commit
Diffstat (limited to '')
| -rw-r--r-- | widget/Bar.tsx | 36 | 
1 files changed, 36 insertions, 0 deletions
| diff --git a/widget/Bar.tsx b/widget/Bar.tsx new file mode 100644 index 0000000..c2db8c5 --- /dev/null +++ b/widget/Bar.tsx @@ -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> +} | 
