summaryrefslogtreecommitdiff
path: root/examples/js/simple-bar
diff options
context:
space:
mode:
authorKevin <[email protected]>2024-10-16 00:49:16 -0300
committerKevin <[email protected]>2024-10-16 00:49:16 -0300
commit2b1e8501b46056b79d97e90c6ec94e3ad36d0ab2 (patch)
tree6486e98bd1ba523b1aeb4bd2566d1ff6e5c41798 /examples/js/simple-bar
parent03f2c4706faba7dac5aee71b10255eac218cbeec (diff)
parent236487001ab2a6c9c8e87e5db0ced9e5ab3ed791 (diff)
Merge branch 'adapt-upstream-changes'
Diffstat (limited to 'examples/js/simple-bar')
-rw-r--r--examples/js/simple-bar/app.ts7
-rw-r--r--examples/js/simple-bar/widget/Bar.tsx4
2 files changed, 9 insertions, 2 deletions
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"