In original griffpatch's project. I've added the distance (ignore the - because of scrolling rules)
All credit to griffpatch © griffpatch Copyleft krzysiogawl01