So, if understand correctly, the lock is mounted on the down tube as sketched below?
If so, you could try placing the "U" part of the D-lock in the frame mount, hold one loop of the cable on one end of the "U", wrap the cable around the seat post & up over the top tube, then back down to the D-lock & then place the locking mechanism on (also as shown in the sketch below).
Is this in the ballpark? It may keep the cable in tight enough to keep from rubbing on your legs. ![enter image description here](