import Apps from "gi://AstalApps"
import { App, Astal, Gdk, Gtk } from "astal/gtk3"
import { Variable } from "astal"
const MAX_ITEMS = 8
function AppButton({ app }: { app: Apps.Application }) {
return
}
export default function Applauncher() {
const { CENTER } = Gtk.Align
const apps = new Apps.Apps()
const text = Variable("")
const list = text(text => apps.fuzzy_query(text).slice(0, MAX_ITEMS))
const hide = () => App.get_window("launcher")!.hide()
return text.set("")}
onKeyPressEvent={function (self, event: Gdk.Event) {
if (event.get_keyval()[1] === Gdk.KEY_Escape)
self.hide()
}}>
text.set(self.text)}
/>
{list.as(list => list.map(app => (
)))}
l.length === 0)}>
}