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.
Note: This tutorial only applies to mac users and has only been tested on Mountain Lion (Mac OSX 10.8)
The hack goes like this:
- Once activated, the script will launch the screensaver and simultaneously lock the computer.
- Next, the script launches a little command line utility changeInput that swaps out your current keyboard layout to the Dvorak layout
- At this point, if you try to simply type in your password normally it will fail.
- 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;
- Finding a copy of the Dvorak keyboard layout (on Google via your tablet/smartphone or a printout)
- 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.
Screen Saver Settings
First, we need to secure our screensaver.
- Open System Preferences and click on the Security & Privacyicon
- Click on the General tab.
- Check the box that starts with Require password.
- Change the amount of time to wait after screensaver begins toimmediately.
Activate Other Keyboard Layouts
Now lets activate the alternative keyboard layout.
- In the System Preferences window, click on the Show All button
- Click the Language & Text icon.
- On the top of the window, click the the Input Sources tab.
- 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.
This little command line tool will let us script the keyboard layout change.
- 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
- 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.
- Open up the app’s preference window and click on the pomodoro icon
- Set the amount of minutes you would like to work under Pomodoro is initially set up to:
- Click the check box under Breaks and set the durationn on the right.
- At the top of the window, click on the Scripts tab.
- 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”
- 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”
- Click the General icon located at the top of the window.
- Check the box labeled Prevent sleep during a pomodoro
- Click on the Pomodoro icon in the menu bar and Click Start Pomodoro
- Pat yourself on the back for a job well done and get to work!
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!