Skip to content
This repository has been archived by the owner on Jul 4, 2021. It is now read-only.

[Request] Select user automatically #7

Open
T-bond opened this issue Jan 27, 2018 · 3 comments
Open

[Request] Select user automatically #7

T-bond opened this issue Jan 27, 2018 · 3 comments

Comments

@T-bond
Copy link

T-bond commented Jan 27, 2018

I would like to ask for a feature. I had only one user to log in, and when my system boots up, I would like to start typing the password. (Without pressing the enter before it)

I know it is a very minor task for me to press the enter, but sometimes I just forgot this.
And combined with the already in ,,autoFocusPassword" it would be perfect.

In the config it could be a ,,selectDefaultUser=username" and it could select that user, or if this value doesn't exists, or the user, it would be the same as now.

@eayus
Copy link
Owner

eayus commented Jan 31, 2018

This is definitely something that I have been meaning to add for a while. I was going to have it automatically go to the password screen if there is only one user on the system. I'll try and do this over the weekend.

@keitho2000
Copy link

Have you made any progress on this? I would really like to use this theme but I can't get over having to press enter before typing my password

@maxmahlke
Copy link

I just found this theme and had the same issue. I wrote a little hack to select the user right away, in the ChooseUser.qml file add

Timer {id: singleUser
  interval: 16
  running: true
  repeat: false
  onTriggered: {
    page.state = "login";
    loginFrame.name = currentItem.name
    loginFrame.realName = currentItem.realName
    loginFrame.icon = currentItem.icon
    focus = false
  
  if (config.autoFocusPassword == "true")
    focusDelay.start();
  else
    loginFrame.focus = true;
  }
  }

And it selects the user after running a 16ms timer automatically.
Disclaimer: I have no idea of QML or anything, I simply looked at the code and figured I could combine the onReturnPressed and Timer functionalities I encountered. I tested the theme with sddm-greeter --test-mode --theme /usr/share/sddm/themes/clairvoyance and it worked fine, but any bugs this may introduce are yours to keep ;)
And if you at a later point add another user this will probably not work anymore.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants