I started wondering a year or so ago if there's enough metadata available in my dev tools to determine if I am actively engaged in debugging or if I'm just decompressing (aka 'fucking around' according to some) on Hacker News.
If I can get that information reliably enough, I could use Automator on OS X to enable Do Not Disturb until a couple minutes after I task switch to anything else that's not focus-based.
At work, we've been pushing everyone to use an app called clockwise. Basically it integrates with your calendar, moves meetings around (with your approval) to maximize focus time (2+ hour blocks of work).
It also allows you to set up "Do not disturb" on slack during your focus and meeting time. It's awesome.
(BTW, no personal association with the company, just a happy user).
I like it! Im having a hard time coming up with solid indicators that Im debugging or otherwise in focus mode that wouldn't also be red herrings for other activity. Have you come up with any good examples for yourself?
If I can get that information reliably enough, I could use Automator on OS X to enable Do Not Disturb until a couple minutes after I task switch to anything else that's not focus-based.