If you use picom as a compositor you can write glsl shaders, there is some work being done twords doing full out CRT emulation at a desktop rendering level, I found the repo below[1], but on my monitor the shader does this distortion at the bottom so I think it could be improved slightly. I'd really like to see someone get the glsl shaders from libretro[2] working with picom.(which the project in OP did) if any GL wizards reading this have any advice I'd be eternally greatful
[1] https://github.com/j-k-tech/picom