Sometimes the simplest hack works.
I have put “Do the fun shit only after you finish planned stuff” on top of my To-do list, and I mark it as done only when the important stuff is done.
Since, I have almost perfect streak when it comes to focusing on the important stuff.