feat(greetd): focus password first
All checks were successful
Discord / discord commits (push) Has been skipped
All checks were successful
Discord / discord commits (push) Has been skipped
This commit is contained in:
parent
ce451079d8
commit
51e4988599
1 changed files with 18 additions and 4 deletions
|
@ -1,3 +1,4 @@
|
|||
const { idle } = Utils;
|
||||
const greetd = await Service.import('greetd');
|
||||
|
||||
const name = Widget.Entry({
|
||||
|
@ -9,18 +10,31 @@ const password = Widget.Entry({
|
|||
placeholder_text: 'Password',
|
||||
visibility: false,
|
||||
on_accept: () => {
|
||||
greetd.login(name.text || '', password.text || '', 'Hyprland')
|
||||
.catch((err) => {
|
||||
response.label = JSON.stringify(err);
|
||||
});
|
||||
greetd.login(
|
||||
name.text || '',
|
||||
password.text || '',
|
||||
'Hyprland',
|
||||
|
||||
).catch((err) => {
|
||||
response.label = JSON.stringify(err);
|
||||
});
|
||||
},
|
||||
});
|
||||
|
||||
const response = Widget.Label();
|
||||
|
||||
const win = Widget.Window({
|
||||
name: 'greeter',
|
||||
css: 'background-color: transparent;',
|
||||
anchor: ['top', 'left', 'right', 'bottom'],
|
||||
keymode: 'exclusive',
|
||||
|
||||
setup: () => {
|
||||
idle(() => {
|
||||
password.grab_focus();
|
||||
});
|
||||
},
|
||||
|
||||
child: Widget.Box({
|
||||
vertical: true,
|
||||
hpack: 'center',
|
||||
|
|
Loading…
Reference in a new issue