this is pretty low-effort, but it seems to work fine?
(by johann150, with some modification by stuebinm)