top | item 9406469

Pause Me – Apply the 20-20-20 rule to prevent eyestrain while working

57 points| qwerty69 | 11 years ago |github.com | reply

50 comments

order
[+] anon4|11 years ago|reply
Implementation for Linux:

    #!/bin/bash
    set -e
    while true; do
        sleep 20m
        xlock -allowaccess&
        pid=$!
        sleep 20s
        kill $pid
    done
Check the manpage for xlock and choose a screensaver that won't keep you looking at the monitor.
[+] darkr|11 years ago|reply
If you're using Xscreensaver instead of xlock:

    #!/usr/bin/env bash
    set -e
    while true; do
        sleep 20m
        xscreensaver-command -activate
        sleep 20s
        xscreensaver-command -deactivate
    done
This presumes that xscreensaver is configured to have a delay before it is locked (and thus requiring a password to unlock - as would happen if we used `xscreensaver-command -lock`).
[+] ssharp|11 years ago|reply
I accidentally did something similar quite a few years ago when I stupidly set up a grep to run updatedb every two hours. There was several months lag as well between when I did that and my computer started locking up every two hours for a few minutes. And embarrassingly, it took me a week or two to put it together.
[+] butwhy|11 years ago|reply
Explanation? DOes it just lock the screen for 20 secs?
[+] sgloutnikov|11 years ago|reply
On the topic of eye strain. For anyone not familiar with f.lux, highly recommend you check it out. Everyone that I have recommended it to so far loves it. https://justgetflux.com
[+] IanCal|11 years ago|reply
The only problem with f.lux is that it's so seamless it's like it's not running, so occasionally I'll turn it off accidentally and it feels like looking into the heart of a supernova.
[+] rosstex|11 years ago|reply
My eye strain ended permanently about 4 years ago, the day I installed f.lux. My eyes have never once felt strained at night after that day. Truly a miracle program.
[+] spain|11 years ago|reply
I recommend f.lux too. The only problems I've encountered with it are:

- doesn't take into account wacky sun hours in nordic countries during winter, I get around this by setting my location to be somewhere else

- isn't able to automatically detect when I'm playing a fullscreen videogame, when I would prefer it automatically switch off

[+] stinos|11 years ago|reply
Is anyhthing known about the internals of it, i.e. what code does it use? Something like SetDeviceGammaRamp on Windows? Or does it talk directly to the video card driver (if that is even possible in a generic way)? Or the monitor? Does it still work reasonably if I already have set my display to low brightness etc?

edit also wondering: it cannot know if I'm sitting in a completely dark room, a sunlit room or a room at night with fluorescent lighting. Don't such factors change what the ideal color would be? (not that I am constantly adjusting my display now according to the amount of clouds outside, just wondering what it does exactly. There's like no info whatsoever?)

[+] rmc|11 years ago|reply
There's also redshift, an open source version that works on linux.
[+] lpsz|11 years ago|reply
I've found f.lux indispensable for long hours of computer work, be it coding or reading. Surprised when I find friends who haven't installed it (or an alternative) yet -- this stuff should be standard, especially on incredibly bright-screen Macs. If you're on Linux, try Redshift instead.

When will something like this be available on my non-jailbroken iPhone? Heck, maybe someone could make a third-party browser app that tints itself ... turning down the brightness is just not the same.

[+] ishansharma|11 years ago|reply
Surprised when I find friends who haven't installed it (or an alternative) yet

And here, I am ridiculed for using Flux. Some marketing people just hate it. One co-worker has me disabling it anytime he has to look at my monitor (not much, but still an annoyance!)

[+] CSDude|11 years ago|reply
Even CyanogenMod has something like flux and it helps.
[+] anupshinde|11 years ago|reply
I have experienced that eyes strain much lesser while using a LCD display instead of an LED display. Experienced this pretty much consistently. LEDs start hurting my eyes after some time.

And I use a MBP with Retina display for long hours - and I have to say, it has never put stress on my eyes at all (unless I make the screen too bright). Also I do not work at super-high small font resolutions - that allows me to keep distance from the screen. The only thing that I find better than it is Kindle reader.

[+] castell|11 years ago|reply
Do you mean a LCD display with fluorescent tube as light source, instead of an LCD display with an LED as light source?

Your MacBookPro with Retina display uses an LCD with LED light source too - it's just an LCD panel with IPS technology instead of the TN technology (common in cheaper desktop monitor panels).

[+] geococcyxc|11 years ago|reply
Your MBP contains what is commonly called an "LED" display - an LCD with LED backlight.
[+] anupshinde|11 years ago|reply
Ah. Thanks castell, geococcyxc, emsy. I didn't know what Retina display uses. I guess my experience is simply due to cheaper TN panels.
[+] emsy|11 years ago|reply
I hate HN lately. Now you can get downvoted for your personal experience. Take my upvote.
[+] naich|11 years ago|reply
Has the 20-20-20 rule actually been scientifically verified as the optimal regime for relieving eye strain or was it something thought up by some bloke off the top of his head?
[+] yelnatz|11 years ago|reply
Is this even usable as a developer?

Seems it'll be annoying for something to break my concentration every 20 minutes, losing my flow all the time.

[+] falcolas|11 years ago|reply
From practical experience, the break in the flow is minimal: you lose your immediate context, not the entire structure you've built up in your mind. And the loss of context isn't always bad, as it's helped me figure out small problems or identify potential problems which I normally miss from being constantly heads down.
[+] dagw|11 years ago|reply
I've been trying this concept for a few days and it's not that bad. It just forces me to stop typing and looking at my screen, not stop thinking or working on my problem, so it doesn't really affect my flow or concentration. It's actually kind of helpful to have to stop and think about what I'm doing.
[+] anon4|11 years ago|reply
I actually use a similar thing - I run a script that locks the screen every 30 minutes and take a short break. At first it can be a bit annoying, but it does reduce eye strain and improves overall well-being.
[+] henrik_w|11 years ago|reply
I use RSIGuard (Mac), not for eye strain but for muscle pain in my forearms. I've set it up to give micro breaks (10 seconds) every 5 minutes and exercise breaks (4 minutes) every 45 minutes. It does break the flow, which is a bit of a pain, but not as much of a pain as I had in my arms :-)

I've written more about how I got rid of my RSI here: http://henrikwarne.com/2012/02/18/how-i-beat-rsi/

[+] rmc|11 years ago|reply
Having pain in your wrists and fingers so you can't type, and not having the ability to focus on the screen, those things are very annoying for developers.
[+] rmc|11 years ago|reply
Workrave is a great cross platform application for doing this.
[+] fmsf|11 years ago|reply
Sounds incredibly disruptive: http://heeris.id.au/2013/this-is-why-you-shouldnt-interrupt-...

After 20 minutes, when you may finally be reaching flow... "POP"...

Using coloured glasses works for me to limit eye strain.

[+] SCdF|11 years ago|reply
I have RSI and use Workrave to force me to take a 30 second break (where I stand up and stretch etc usually) every 10 minutes and a 5 minute break every hour of typing (which, since software development is a lot of discussing and thinking as well as just typing, doesn't usually mean it comes up every hour).

You get used to it, and I honestly don't think it disrupts any kind of flow. That cartoon is about disrupting you with some other information, not with a break.

[+] rdsubhas|11 years ago|reply
Better POP flow now than POP eyes later.
[+] kranner|11 years ago|reply
If you use this, you might as well take the opportunity to stand up every 20 minutes.
[+] hamparawa|11 years ago|reply
Would like to see multiple screen support too..
[+] qwerty69|11 years ago|reply
Thanks for the feedback. Multi-Screen support has been added.
[+] castell|11 years ago|reply
Thanks a lot, it seems simple and useful.