lahwaacz / sxlock

MIT License
41 stars 21 forks source link

Set fore/background colors? PAM setcred? #29

Open Barbaross93 opened 3 years ago

Barbaross93 commented 3 years ago

Would it be possible to add an option change the colors?

Additionally, upon successful PAM authentication, would it be possible to add pam_setcred after line 234? It would make this screenlocker usable with such tools as https://github.com/cruegge/pam-gnupg.

lahwaacz commented 3 years ago

It shouldn't complicate things too much, so pull requests are welcome. What does pam_setcred do?

Barbaross93 commented 3 years ago

I'm a total novice with C, so do you have pointers on how to go about implementing fore/background colors? Adding pam_setcred should be straightforward at least. As for pam_setcred, others can explain it better than I can, but essentially it will refresh passwords for programs when password caches are cleared prior to screen locking or when logging in to the session for the first time. This is useful for users of pam-gnupg, gnome-keyring, kerberos tickets, and probably other tools. Ultimately, it prevents the user from having to enter their passwords again for the programs that need verification after logging in

lahwaacz commented 3 years ago

Oh, I see. I've added pam_setcred, please test if it works.

For the background there is a function XSetWindowBackground, I'm sure there are also some examples somewhere on the internet...