
Pause Me – Apply the 20-20-20 rule to prevent eyestrain while working - qwerty69
https://github.com/ppratscher/pause.me
======
anon4
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.

~~~
ssharp
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.

~~~
ssharp
*stupidly set up a cron

------
sgloutnikov
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](https://justgetflux.com)

~~~
spain
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

~~~
ryanjshaw
\- every now and then I'll edit a photo, upload it somewhere, and then get
very confused about why it looks so weird when showing it to somebody on my
phone -- it would be great if f.lux shut off when certain user-configurable
applications are in focus

~~~
iamlolz
This is what's kept me from using it, I'm often jumping in and out of
photoshop.

------
lpsz
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
_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!)

------
brainyz
There is also a Chrome App called Eye Care. It has slightly more flexibility
and runs on Win/Mac/Linux

[https://chrome.google.com/webstore/detail/eye-
care/ingonfahm...](https://chrome.google.com/webstore/detail/eye-
care/ingonfahmmfgbamnahjpkccllhpmidcp?hl=en&gl=001)

+1 for f.lux

~~~
giraj
Another alternative is Melatonin[1] which tries to imitate f.lux for
chrome(book) users.

[1] [https://giraj.github.io/melatonin](https://giraj.github.io/melatonin)

------
anupshinde
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.

~~~
emsy
I hate HN lately. Now you can get downvoted for your personal experience. Take
my upvote.

~~~
ciupicri
He probably got downvoted for messing up the technical terms as castell and
geococcyxc pointed.

~~~
emsy
Huh, I hadn't even considered that as a reason. Oh HN, I am disappoint.

------
naich
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?

~~~
drwl
I wasn't able to find any conclusive evidence, but there are studies that have
shown that taking breaks and changing the distance of what you're focusing on
(things that the 20-20-20 rule suggests to do) can help improve eye strain.
One study:
[http://www.ajronline.org/doi/pdf/10.2214/ajr.184.2.01840681](http://www.ajronline.org/doi/pdf/10.2214/ajr.184.2.01840681)

------
yelnatz
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
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.

------
rmc
Workrave is a great cross platform application for doing this.

------
mparramon
I use Time Out for OS X, works like a charm:

[http://www.dejal.com/timeout/](http://www.dejal.com/timeout/)

------
fmsf
Sounds incredibly disruptive: [http://heeris.id.au/2013/this-is-why-you-
shouldnt-interrupt-...](http://heeris.id.au/2013/this-is-why-you-shouldnt-
interrupt-a-programmer/)

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

Using coloured glasses works for me to limit eye strain.

~~~
SCdF
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.

------
kranner
If you use this, you might as well take the opportunity to stand up every 20
minutes.

------
hamparawa
Would like to see multiple screen support too..

~~~
qwerty69
Thanks for the feedback. Multi-Screen support has been added.

------
castell
Thanks a lot, it seems simple and useful.

------
iM8t
Anything similar for OSX?

~~~
duiker101
And for Linux(Mint/Ubuntu)?

~~~
bbguitar
For Linux - workrave [http://www.workrave.org/](http://www.workrave.org/)

~~~
1wd
Can also recommend workrave for Windows.

