From 791f10aad4629b6e9b40c39010aa029a0ebdac07 Mon Sep 17 00:00:00 2001 From: Janis Hutz Date: Sun, 30 Mar 2025 10:56:18 +0200 Subject: [PATCH] [Launcher] Prepare UI --- config/ags/launcher/ui/Launcher.tsx | 44 ++++------------------------- 1 file changed, 6 insertions(+), 38 deletions(-) diff --git a/config/ags/launcher/ui/Launcher.tsx b/config/ags/launcher/ui/Launcher.tsx index f10563a..90714c4 100644 --- a/config/ags/launcher/ui/Launcher.tsx +++ b/config/ags/launcher/ui/Launcher.tsx @@ -7,15 +7,9 @@ function hide() { export default function Launcher(monitor: Gdk.Monitor) { const { CENTER } = Gtk.Align - const apps = new Apps.Apps() const width = Variable(1000) const text = Variable("") - const list = text(text => apps.fuzzy_query(text).slice(0, MAX_ITEMS)) - const onEnter = () => { - apps.fuzzy_query(text.get())?.[0].launch() - hide() - } return { text.set("") - width.set(self.get_current_monitor().workarea.width) + width.set(self.get_current_monitor().get_width_mm()) }} - onKeyPressEvent={function (self, event: Gdk.KeyEvent) { - if (event.get_keyval() === Gdk.KEY_Escape) - self.hide() + onKeyPressed={(self, keyval, keycode) => { + print( 'key pressed: ' + keyval + ' which has code ' + keycode ); }}> - w / 2)} expand onClick={hide} /> - - - - text.set(self.text)} - onActivate={onEnter} - /> - - {list.as(list => list.map(app => ( - - )))} - - l.length === 0)}> - - - - - - w / 2)} expand onClick={hide} /> + - + + }