How I Force Myself to Take Breaks

This one is from the archives. Some of the tools might not work on newer versions of OSX

Habits can be hard to break. One of my worst is pushing through a days work without taking any breaks while assuming that more work = more productivity. However, this couldn’t be further from the truth. Many studies show that focused work intervals combined with frequent breaks will amount to greater productivity.

After a little bit of tinkering, I’ve come up with a hack that forces me to step away from my computer for a predetermined amount of time.

Enjoy!

Note: This tutorial only applies to mac users and has only been tested on Mountain Lion (Mac OSX 10.8)

Overview

The hack goes like this:

  1. Once activated, the script will launch the screensaver and simultaneously lock the computer.
  2. Next, the script launches a little command line utility changeInput that swaps out your current keyboard layout to the Dvorak layout
  3. At this point, if you try to simply type in your password normally it will fail.
  4. Once the predetermined break time is up, changeInput will return your keyboard to its original layout.

The key here is that you could login again during your break if you MUST. However, to do so will require a tedious process of;

  1. Finding a copy of the Dvorak keyboard layout (on Google via your tablet/smartphone or a printout)
  2. Slowly matching the location of the keys to your password on your keyboard.

During this process, you’ll have some time to think about your decision to forgo your (much needed) break.

Setup Tutorial

Screen Saver Settings

First, we need to secure our screensaver.

  1. Open System Preferences and click on the Security & Privacyicon
  2. Click on the General tab.
  3. Check the box that starts with Require password.
  4. Change the amount of time to wait after screensaver begins toimmediately.

Activate Other Keyboard Layouts

Now lets activate the alternative keyboard layout.

  1. In the System Preferences window, click on the Show All button
  2. Click the Language & Text icon.
  3. On the top of the window, click the the Input Sources tab.
  4. On the left of the windows, you will now see a list of available keyboard layouts. Scroll down to find Dvorak and check the box to it’s left.

Download changeInput

This little command line tool will let us script the keyboard layout change.

  1. Download a copy of changeInput by Allan Craig and save it to the ~/bin/directory. > Note: You may need to create the ~/bin/ directory if it doesn’t already exist.

Set Up Pomodoro

  1. Download a copy of Pomodoro and launch the app. > The official website for Pomodoro seems to be broken at the moment, so I’ve taken the liberty of hosting the file myself for the time being.
  2. Open up the app’s preference window and click on the pomodoro icon
  3. Set the amount of minutes you would like to work under Pomodoro is initially set up to:
  4. Click the check box under Breaks and set the durationn on the right.
  5. At the top of the window, click on the Scripts tab.
  6. Click the checkbox labeled End, copy the script below and paste it in the box on the right. do shell script “open /System/Library/Frameworks/ScreenSaver.framework/Versions/A/Resources/ScreenSaverEngine.app” do shell script “~/bin/changeInput > /tmp/myKeyboard” do shell script “~/bin/changeInput toggle $(cat /tmp/myKeyboard) Dvorak”
  7. Click the checkbox labeled Break End, copy the script below and paste it in the box on the right. do shell script “~/bin/changeInput toggle $(cat /tmp/myKeyboard) Dvorak”
  8. Click the General icon located at the top of the window.
  9. Check the box labeled Prevent sleep during a pomodoro

Go!

  1. Click on the Pomodoro icon in the menu bar and Click Start Pomodoro
  2. Pat yourself on the back for a job well done and get to work!

Final Thoughts

Yes, it’s a slightly convoluted process compared to just standing up and walking away, but if you need an extra push like I did, this should get the job done.

Do you have a similar process or think this one could be improved / simplified? Let me know in the comments below!