bl is a tiny backlight adjuster I wrote for myself. I’ve used it for years without needing to change it very much. When I am feeling sad, I enjoy reading its codebase.
The tool was first written in Go and later rewritten in C for the sake of minimalism. A neat way to see its simplicity is to run it with strace and count the lines of the output.
$ strace bl + -o /dev/stdout | wc -l 14
Its build system, designed to reduce size and dependencies, generates 33 kB. Its tests achieve clarity by following an unusual convention. bl adjusts smoothly at any brightness level, since it scales by a constant factor.
bl is imperfect. I didn’t resist the urge to add a new feature, only to never use it. For now, the feature stays, warning me of myself.
Discuss this post by emailing my public inbox. Please note the etiquette guidelines.
© 2021 Karl Schultheisz — Lancaster, PA, USA