slock with patches
slock is a very simple screen locker by the people of suckless.
I patched it to display a clock, timer, and battery state.

This is what I see when I lock my screen.
For complicated reasons I don’t remember anymore, I don’t use a more “native”
form of screen locking, like session management. I also stopped using
xscreensaver, because it would sometimes crash on me (which tells you a lot
about the state of my setup). As such, I moved to suckless’ slock, which is,
in its default form, extremely barebones. All it does is change the window fill
colour on input and login fail, and looks like a fullscreen colored rectangle.
While this is an approach very light on bloat, I figured I could use some more eye candy. I started by applying the message patch, which provided me with a baseline of rendering text. I also added the alternate colors patch, which causes the background color to alternate on keypresses, to make the input more responsive.
Based on the code added by the message patch, I hacked in a wall clock, lock
timer, and battery state monitor (thanks, /sys/class/power_supply/BAT0/*!)
to the upper left corner. This required
modifying the main program loop without really knowing what I’m doing, but with
a sliver of an idea how select(2) is supposed to work, I modified the code
so the screen redraws not only on input, but also every second. The resulting
code is very ugly and I will not be posting it. Also, the screen very clearly
flashes black on redraws, which means this is a suboptimal solution, but it
works.
Some time later, I wanted to add a clock that I can see without glasses.
Making one with only XDrawArc was very simple (implementation-wise), but
also visible from a decent distance while being as blind as I am. The innermost
circle is the hour hand, then the minute hand, and the seconds hand. Not the
prettiest, but does the job just fine.