lockrs
- 5 Devlogs
- 27 Total hours
This is a wayland server agnostic, gpu-accelerated lock screen, made in Rust and based on the wayland-client and egui crates.
This is a wayland server agnostic, gpu-accelerated lock screen, made in Rust and based on the wayland-client and egui crates.
I managed to add PAM authentication. I also tried to add support for shaders and in general gpu work, and discovering i bit off way more than i can chew, i just decided not to.
So, i tried to add a background, but i stumbled upon an obstacle which sent me diving into egui’s source code, because it kept claiming that it couldn’t load images with side bigger than 2048px; turns out this is only a limitation of the WebGPU API, that, as the name suggests, runs on browsers, not on desktops. Anyways, after a lot of fiddling with egui’s components, i managed to make it use images with sides up to 8000px.
Now i’ll probably customize the bar a little, and maybe make a few egui widgets for it.
After wrecking my mind unnecessarily over how to handle pointer events for a ridiculous amount of time, I finally got something that somehow works; now i also have a working text input! It just prints the input to the terminal for now, but I’ll be messing with PAM a bit to do authentication now. wish me luck!
I finally got the keyboard to work! for now, it just exits as soon as a key is pressed, but i’m working on implementing full functionality. also, now the code is much much cleaner, properly divided in functions instead of being all chucked into main. I don’t really have a way to display this with a screenshot, so i’ll just reuse an old one unfortunately :p
Well, i managed to render to the lock screen with egui instead of using
the raw buffer; for now, it’s still a mess of spaghetti code that barely
works and will turn into a footgun very quickly if i don’t get
working on the lower level part of it instead of throwing stuff at the
wall and seeing if it sticks. The next step is tidying the code up
instead of throwing everything into main, so that i can get some
customization going. Also, i should probably add the authentication part
of the lock screen instead of having it unlock after a few seconds.
I finished a first proof of concept for wl-lock; right now, it locks the user out for two seconds while displaying a mauve screen.
For now, it’s still fully cpu rendered, but i plan on adding gpu-accelerated background blur and general effects.
The next step is hooking egui into it!