diff options
author | Aylur <[email protected]> | 2024-10-15 01:26:40 +0200 |
---|---|---|
committer | Aylur <[email protected]> | 2024-10-15 01:26:40 +0200 |
commit | d63332b533b390e7e68f8f1fc2432958c4d36a4f (patch) | |
tree | b0abaff53310c0caab0f4074eb68ee8baa963300 /examples/js | |
parent | 2f71cd4c08bb4514efe43533e6a5d03535204c29 (diff) |
update examples
Diffstat (limited to 'examples/js')
-rw-r--r-- | examples/js/.gitignore | 3 | ||||
-rw-r--r-- | examples/js/simple-bar/app.ts | 7 | ||||
-rw-r--r-- | examples/js/simple-bar/widget/Bar.tsx | 4 |
3 files changed, 12 insertions, 2 deletions
diff --git a/examples/js/.gitignore b/examples/js/.gitignore index b0d983b..261d669 100644 --- a/examples/js/.gitignore +++ b/examples/js/.gitignore @@ -1,3 +1,6 @@ @girs/ tsconfig.json env.d.ts +dist/ +package.json +package-lock.json diff --git a/examples/js/simple-bar/app.ts b/examples/js/simple-bar/app.ts index 05f043a..4b7ea48 100644 --- a/examples/js/simple-bar/app.ts +++ b/examples/js/simple-bar/app.ts @@ -1,8 +1,13 @@ -import { App } from "astal" +import { App } from "astal/gtk3" import style from "./style.scss" import Bar from "./widget/Bar" App.start({ css: style, + instanceName: "js", + requestHandler(request, res) { + print(request) + res("ok") + }, main: () => App.get_monitors().map(Bar), }) diff --git a/examples/js/simple-bar/widget/Bar.tsx b/examples/js/simple-bar/widget/Bar.tsx index 644e835..efc065a 100644 --- a/examples/js/simple-bar/widget/Bar.tsx +++ b/examples/js/simple-bar/widget/Bar.tsx @@ -1,4 +1,6 @@ -import { App, Variable, Astal, Gtk, Gdk, GLib, bind } from "astal" +import { App } from "astal/gtk3" +import { Variable, GLib, bind } from "astal" +import { Astal, Gtk, Gdk } from "astal/gtk3" import Hyprland from "gi://AstalHyprland" import Mpris from "gi://AstalMpris" import Battery from "gi://AstalBattery" |