Hacking “Time Out” and Forcing Myself to Take a Break

I have a bad habit of banging my head against a problem instead of taking a step back to clear my thoughts. I’m a D on the DISC profile, and I blame that for my tendency to keep attacking a problem full-tilt rather than re-evaluating my approach.

Rationally, I’m well aware of the benefits of taking a break. But in the moment, I just want to keep going for that next dopamine kick that comes with each minor breakthrough. Never mind that if I took a break, I might see that my whole approach is flawed, because “slow is smooth, smooth is fast.” Or as I like to think of it, “slow is smart, smart is fast.”

Unstoppable Force…

Over the years, I’ve tried to remedy this problem with software that encourages you to take a break, such as the Time Out app. This app and others like it can be configured to initiate a break every hour or two. Generally, the app goes full-screen—which covers your other apps—and displays a message saying it is time for a break.

Usually, when I start using a break app, I’m good about honoring the break. But it never lasts for long. Inevitably, a break reminder pops up while I’m in the middle of a demanding task, like getting a complex test to pass. When my attention is locked in on a problem, I see the break as an annoyance. Because of this, I postpone the break for 10 minutes to give me time to wrap up. However, odds are good that 10 minutes later, I will be in the middle of another task. So I postpone again. And again. Until finally I skip the break altogether.

Pretty soon, I end up taking no breaks at all. Worse yet, I feel annoyed every time the app tries to get me to take a break, which drives up my adrenaline even farther.

I know from repeated struggles that I will resist taking a break whenever I am in that clenched-fist, “I will solve this problem if it kills me” mode. So, I decided to make it all but impossible to resist.

…Meet Immovable Object

To force myself to take a break, I automated the following behavior on my computer:

  1. At a pre-determined break time, the Time Out app opens (if it isn’t already open).
  2. I see a small OS notification in the corner of the screen, telling me a break will start in two minutes.
  3. Two minutes later, a break starts with the Time Out app. The skip and postpone buttons are disabled, so I cannot stop the break.
  4. The break lasts five minutes, giving me a chance to get up, stretch, collect my thoughts, etc.
    1. Setting up my breaks this way also allows me to pick specific times (e.g. 10:15 AM) instead of “every N hours.” Personally, I find this much easier to work into my day consistently.

      Be Annoying at the Right Time

      The break cannot be skipped once it starts, so I won’t just dismiss it because I’m in the middle of something. The two-minute warning gives me a chance to wrap up what I’m doing. I chose two minutes because it seems long enough to get my current task into a good state for a pause, but not so long that I will ignore the warning and keep working regularly.

      Additionally, while the OS notification may feel like a mild disruption, it isn’t actively getting in the way of my current task. It doesn’t give me that knee-jerk “swat the fly out of my way” response I had when the full-screen break would start. The goal is that by the time the break is annoying me, it’s too late to stop it.

      That said, if absolutely necessary, I have a way to stop the break. I allowed for this because of special circumstances, like being on a screen-sharing call with a customer. In such a case, I cannot afford for my computer to lock up for five minutes.

      If I need to stop the break, I just close the Time Out app within the two-minute window after the OS notification. I recognize that this could become an avenue whereby I skip the break altogether, so I am considering ways of de-incentivizing skips. For example, perhaps closing the Time Out app in the two-minute window will force me to select a new time for the break.

      How It Works

      My mandatory break is set up as a Bash script:

      
      #!/bin/bash
      open -a "Time Out"  # open Time Out app by name
      sleep 2             # wait 2 seconds
      
      # send OS notification
      /Users/will/.rbenv/shims/terminal-notifier -message "Get Ready for a Break" -timeout 5
      
      sleep 115 # wait almost 2 minutes
      
      # initiate keyboard shortcut to start a Time Out break
      /usr/bin/osascript -e "tell application \"System Events\" to keystroke \"n\" using command down & shift down & option down"
      

      A few notes about the script:

      • I use terminal-notifier to send the alert that I have two minutes until the break.
      • osascript runs AppleScript from the command line. With AppleScript, I can send the keystrokes that start a break immediately.
      • It is possible to stop a break once it has started, albeit so difficult that I will only do so in an emergency. Ctrl+tab still lets me switch to a terminal. From there, I can find the break process (ps aux | grep "dejal\.timeout\.free\.break") and kill it.

      Lastly, I set up Cron to start my breaks at 10:15 AM and 3:00 PM:

      
      15 10 * * 1-5 /Users/will/home/bin/take_a_break
      00 15 * * 1-5 /Users/will/home/bin/take_a_break
      

      Automate the Environment for a Better You

      I’m glad I took these steps. I’m already seeing benefits. The other day when break time came up, I was just getting started with several small changes to an app. The approach I was taking boiled down to making a small hack, seeing if that would be enough, and repeating. But because I had to take a break and therefore had time to collect my thoughts, I realized I could save time and stress with a clever refactoring of the code that unified several of the changes I was trying to make.

      I see the time I spent writing the break script as using my rational brain now to force me to make smart decisions later, when I might not be so rational. To put it another way, rather than trying to overcome the temptation to keep working when I should take a break, I am changing my environment to remove the temptation.

      I really like that I was able to use automation to accomplish this. I’m on the lookout for more situations where I can automate my environment to encourage healthier, smarter behavior.