refactor!: start migration to latest ags

This commit is contained in:
2025-12-05 17:00:22 -08:00
parent 1759e2d976
commit 42b4f99c37
12 changed files with 191 additions and 147 deletions

View File

@@ -1,5 +1,6 @@
import { bind, Variable } from "astal"
import { createPoll } from "ags/time";
import AstalHyprland from "gi://AstalHyprland?version=0.1";
import { createState } from "gnim";
const hyprland = AstalHyprland.get_default()
@@ -7,10 +8,15 @@ function get_title() {
return hyprland.focusedClient?.title ?? ""
}
const title = Variable(get_title()).poll(200, () => get_title())
// const title = Variable(get_title()).poll(200, () => get_title())
export default function Title() {
const title = createPoll("", 200, () => get_title())
return (
<label label={title(t => t)} />
<label label={title} />
)
// return (
// <label label={title(t => t)} />
// )
}