Awesome FOSS Logo
Discover awesome open source software
Launched 🚀🧑‍🚀

Protect Your Eyes From Strain on Arch

Categories
Arch Linux penguin

tl;dr - Screen brightness/light control with redshift/flux and eye break timing with safeeyes/breaktimer is good for your eyes, check it out.

Deutsche Welle (DW) provides an excellent service that I can’t stop raving about to friends – they have a YouTube channel for documentaries that I love watching. I mostly use YouTube for watching conferences and getting at some of the insane wealth of information out there in the tech community, but I do enjoy watching some news from time to time amongst other things. Well I have buried the lede a little bit but the reason I thought of looking into tools that might help me preserve my ocular health was watching DW’s recent video on taking care of your eyes. It was really eye-opening (pun intended?) to see the strong correllation and research around myopia in the world and the lengths people go to to maintain their sight. I already wear glasses so it’s too late for me but I think I should be doing more to at least lessen the strain on my eyes so I went in search of some technical solutions.

Basiclaly this post boils down to:

These are all F/OSS options, and you can find their sites below:

Thanks to all the respective authors of these projects – they’re awesome. Breaktimer has a pretty aesthetically pleasing front page and is a bit newer but I went with SafeEyes since it was in AUR in multiple forms and a bit better rated there.

Install and setup redshift

The arch documentation is pretty fantastic here, so just use that. Basically pacman -S redshift gets you there.

Install SafeEyes using yay

Yay (which may or may not be replaced by paru) is my pacman and AUR wrapper of choice (often I just use pacman), and SafeEyes is really easy to install with it. Just run the usual yay safeeyes (or yay -S safeeyes) and you’re off to the races.

Making sure SafeEyes runs whenever you log in

I have a similar setup for running redshift, but what you can use here is user-level systemd. The unit file should be at a path like ~/.config/systemd/user/safeeyes.service, and contents look like this:

[Unit]
Description=SafeEyes eye strain preventer
Documentation=https://slgobinath.github.io/SafeEyes/
After=display-manager.service

[Service]
Environment="DISPLAY=:0.0"
ExecStart=/usr/bin/safeeyes
Restart=always
RestartSec=10

[Install]
WantedBy=default.target

Will it work with my “rice”?

For those who are unfamiliar, PC “rice” is the concept of aesthetic-only customization of your desktop environment – back in the day this was getting custom taskbars and CPU/memory readouts, etc. These days I mostly see it on subreddits like r/unixporn (though I think there are some even more specific rice subreddits). My setup consists of:

  • bspwm for window management
  • picom (formerly compton) for compositing (opacity, transitions, etc)
  • polybar for a task bar
  • sxhkd for hotkeys

While I don’t know if it will work for you, but SafeEyes just worked for me – it was on a screen (out of two) I didn’t expect at first but once I was over having to look at both screens to find it periodically I was used to it.

Consider donating

It’s important to support free/open source software and it’s authors, if you have the means to do so, and you find it worthy of support. I donated to Redshift (nothing crazy, just 20EUR), and while there’s a ton of projects I use and extract value from but don’t donate to (and I probably should), it’s worth nothing that something is better than nothing.

Wrapup

Pretty short post this time but if this information is news to you, hopefully your eyes will benefit!