sddm-theme-clairvoyance icon indicating copy to clipboard operation
sddm-theme-clairvoyance copied to clipboard

[Request] Select user automatically

Open T-bond opened this issue 7 years ago • 3 comments

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.

T-bond avatar Jan 27 '18 11:01 T-bond

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.

eayus avatar Jan 31 '18 14:01 eayus

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

keitho2000 avatar Jun 10 '19 16:06 keitho2000

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.

maxmahlke avatar Jul 17 '19 13:07 maxmahlke