Have you ever played The Sims? In The Sims 3, they put more emphasis on how certain activities get you "in the mood" for focus, play, and even romance! wink wink I've found that physically doing things (and maybe even physically moving into different rooms or places) helps me detach & transition into a different mindset.
When coding, the activities before I begin working usually revolve around tech: reading stuff on here, maybe some Codewars, or even just watching YouTube videos.
When I want to break away, I use different activities to encourage & inspire me to do something else. Time to relax? Netflix, video games for an hour or two, or watch Twitch. Time to exercise? LOUD, bumpin' music from Spotify, and lots of posturing in the mirror.
Speaking of this, I really need to reinstall The Sims 3. LOL.
We're a place where coders share, stay up-to-date and grow their careers.
We strive for transparency and don't collect excess data.