Pause Me – Apply the 20-20-20 rule to prevent eyestrain while working
github.comImplementation 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.If you're using Xscreensaver instead of xlock:
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`).#!/usr/bin/env bash set -e while true; do sleep 20m xscreensaver-command -activate sleep 20s xscreensaver-command -deactivate doneI 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.
*stupidly set up a cron
Explanation? DOes it just lock the screen for 20 secs?
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
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.
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.
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
- 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
This is what's kept me from using it, I'm often jumping in and out of photoshop.
I don't know about windows, but a recent-ish update on OSX added the ability to disable per application.
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?)
Not sure how it works for Windows but the Linux source is available which could give you an idea:
There's also redshift, an open source version that works on linux.
And for Android, there's "Twilight" :)
Wonderful tools
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.
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!)
Even CyanogenMod has something like flux and it helps.
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...
+1 for f.lux
Another alternative is Melatonin[1] which tries to imitate f.lux for chrome(book) users.
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.
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).
Your MBP contains what is commonly called an "LED" display - an LCD with LED backlight.
Ah. Thanks castell, geococcyxc, emsy. I didn't know what Retina display uses. I guess my experience is simply due to cheaper TN panels.
I hate HN lately. Now you can get downvoted for your personal experience. Take my upvote.
He probably got downvoted for messing up the technical terms as castell and geococcyxc pointed.
Huh, I hadn't even considered that as a reason. Oh HN, I am disappoint.
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?
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
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.
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.
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.
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.
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/
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.
Workrave is a great cross platform application for doing this.
I use Time Out for OS X, works like a charm:
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.
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.
Better POP flow now than POP eyes later.
If you use this, you might as well take the opportunity to stand up every 20 minutes.
Would like to see multiple screen support too..
Thanks for the feedback. Multi-Screen support has been added.
Thanks a lot, it seems simple and useful.