From 5c64b5bd424d37b45e7a7ec7e8d7c7d41c2eb1bf Mon Sep 17 00:00:00 2001 From: matt1432 Date: Thu, 8 Feb 2024 14:24:33 -0500 Subject: [PATCH] refactor(greetd): change some ags code --- modules/ags/config/greeter.ts | 15 +++++---------- 1 file changed, 5 insertions(+), 10 deletions(-) diff --git a/modules/ags/config/greeter.ts b/modules/ags/config/greeter.ts index 364e3fb3..11cf01c2 100644 --- a/modules/ags/config/greeter.ts +++ b/modules/ags/config/greeter.ts @@ -107,11 +107,12 @@ const password = Entry({ password.text || '', 'Hyprland', - ).catch((err) => { - response.label = JSON.stringify(err); + ).catch((error) => { + response.label = JSON.stringify(error); }); }, -}); + +}).on('realize', (entry) => entry.grab_focus()); const response = Label(); @@ -119,13 +120,7 @@ const win = Window({ name: 'greeter', css: 'background-color: transparent;', anchor: ['top', 'left', 'right', 'bottom'], - keymode: 'exclusive', - - setup: () => { - idle(() => { - password.grab_focus(); - }); - }, + keymode: 'on-demand', child: Box({ vertical: true,