Default eye rest and nightlight feature

Suggestions and feedback for Linux Mint and the forums
Forum rules
No support questions here please. Before you post read: Where to post ideas & feature requests
Post Reply
NavN
Level 1
Level 1
Posts: 14
Joined: Thu May 18, 2023 2:06 pm

Default eye rest and nightlight feature

Post by NavN »

For resting the eyes, there are various software like Workrave. For nightlight, there's Redshift. However, these software don't take some factors into account, which are important:
1. Workrave's strain timer runs only if keystrokes or mouse movements are detected. However, the eyes get strained even if the user is simply reading text.
2. Redshift has no options in its GUI to increase or decrease the strength of the redshift effect based on time of the day. Actually it doesn't have a GUI option to change the intensity at all.

Eye strain when using the computer is now well known as a worldwide problem, Even Android, Windows and Ubuntu have introduced nightlight as a default feature. Couldn't Mint bring about a default nightlight and eye rest reminder software which has practical options that allow Users to actually reduce the strain on their eyes?
nachlese
Level 4
Level 4
Posts: 413
Joined: Sun Apr 09, 2023 11:27 am

Re: Default eye rest and nightlight feature

Post by nachlese »

My only experience is with redshift.
If you run it "correctly" configured, it will change settings based upon time of day and (current) location.

Both of these are enough for me - I don't need it to lower color temperature during the bright daylight hours.
It will transition the color temperature during sunset/sunrise - and both day and night values are adaptable.
... not through a GUI though

Althoug the website, along with configuration examples, provides a link to a Plasmoid (Plasma thingie for the KDE/Plasma desktop)
which apparently does provide a GUI interface.
I have no use for it, don't use QT apps when I can avoid it - and don't know it.
http://jonls.dk/redshift/

Android, mostly running on smartphones, has the advantage of built in methods and hardware for ambient light detection.
... not true for most desktop and not even many notebook computers - that may be one reason why that feature is not present.
But there are ways to use such hardware or the notebook camera for that purpose - but this is manual work. 8)
sleeper12
Level 21
Level 21
Posts: 12512
Joined: Thu May 25, 2017 3:22 pm

Re: Default eye rest and nightlight feature

Post by sleeper12 »

nachlese
Level 4
Level 4
Posts: 413
Joined: Sun Apr 09, 2023 11:27 am

Re: Default eye rest and nightlight feature

Post by nachlese »

But it doesn't affect the whole screen output - just websites displayed within Firefox, right?
So: the "shock" will be substantial when you, in the middle of the night, switch from a firefox window to another app 8) :)
sleeper12
Level 21
Level 21
Posts: 12512
Joined: Thu May 25, 2017 3:22 pm

Re: Default eye rest and nightlight feature

Post by sleeper12 »

I only use Firefox, but you are probably right.
User avatar
Moem
Level 22
Level 22
Posts: 15632
Joined: Tue Nov 17, 2015 9:14 am
Location: The Netherlands
Contact:

Re: Default eye rest and nightlight feature

Post by Moem »

NavN wrote: Thu May 18, 2023 2:53 pm 2. Redshift has no options in its GUI to increase or decrease the strength of the redshift effect based on time of the day. Actually it doesn't have a GUI option to change the intensity at all.
That depends... which GUI are you using? There's more than one. But the basic idea behind Redshift is precisely to increase or decrease the strength of the redshift effect based on time of the day. That's the whole point.

The standard GUI is a package called redshift-gtk but if you happen to be using Cinnamon, there is as an alternative a Redshift applet that has more options, and may suit your needs.
Image

If your issue is solved, kindly indicate that by editing the first post in the topic, and adding [SOLVED] to the title. Thanks!
nachlese
Level 4
Level 4
Posts: 413
Joined: Sun Apr 09, 2023 11:27 am

Re: Default eye rest and nightlight feature

Post by nachlese »

...
which GUI are you using? There's more than one.
There is/are multiple GUI options?

I wasn't aware (beside the Plasma / KDE thing mentioned on the project web site).
I don't need additional functionality - so I didn't even look for such.

... still, I'd like to know - out of curiosity and without having to search for things and features I currently don't miss :)

... in a VM (which is where my Cinnamon install is)
I can't test this.
But good to know - it's probably the Gnome interface to it.
Last edited by nachlese on Thu May 18, 2023 5:10 pm, edited 1 time in total.
User avatar
Moem
Level 22
Level 22
Posts: 15632
Joined: Tue Nov 17, 2015 9:14 am
Location: The Netherlands
Contact:

Re: Default eye rest and nightlight feature

Post by Moem »

nachlese wrote: Thu May 18, 2023 5:06 pm
...
which GUI are you using? There's more than one.
There is/are multiple GUI options?
Yes, the other one is mentioned in the second half of my post. :)
Image

If your issue is solved, kindly indicate that by editing the first post in the topic, and adding [SOLVED] to the title. Thanks!
nachlese
Level 4
Level 4
Posts: 413
Joined: Sun Apr 09, 2023 11:27 am

Re: Default eye rest and nightlight feature

Post by nachlese »

Your response was quick - while I was still amending my post
... the Gnome interface to it ...
the level of functionality I don't know (... Cinnamon in a VM ...)
User avatar
KMD2023
Level 1
Level 1
Posts: 11
Joined: Fri Mar 24, 2023 2:22 pm

Re: Default eye rest and nightlight feature

Post by KMD2023 »

I'm less experienced than many other folks here, but I had a similar need and I used Zenity* to make a script that pops up a message after a few hours to remind me to take a break. I have another that launches 10 seconds after login to remind me to turn on my external backup drive because I kept forgetting.

I saved my file as a .sh script in a home folder I keep such things in (well, I plan to at least), I made sure it was executable and then used Mint's startup apps feature to launch it when I login. You could also add it as a cron job that points to your script, but I'm out of practice on using cron.
(Mint's startup apps feature might already use cron - not sure).

Zenity website with manuals. Zenity may already be installed so, running

Code: Select all

man zenity
at the terminal might get the same info.
* https://help.gnome.org/users/zenity/

I am not at home, so I'm going off older notes I made here at work. My script looks a bit like this below.
Smarter folks here probably know a far more graceful method, so maybe this can inspire someone else to pour some sugar on it.

I do need to say that I borrowed the "function show_message" parts as shown, but then later went another route and it worked the same. Again - smarter monkeys than me may need to chime in with better methods to skin this cat.

Code: Select all

#!/bin/bash

# Reminder to take breaks at 3 hrs - (10800 seconds is 3 hours)
function show_message() {
    sleep 10800
    
# How to show the message
    zenity --info --text="Take a BREAK!"
}

show_message
KMD2023
NW USA
Linux Hobbyist - Made the full switch Mar 2023
- "Backups are your friend, and Timeshift is a friend with benefits!"
NavN
Level 1
Level 1
Posts: 14
Joined: Thu May 18, 2023 2:06 pm

Re: Default eye rest and nightlight feature

Post by NavN »

The only UI I see for redshift is this https://ibb.co/mTZ11dR
@KMD2023: Three hours until a break is too less rest. Please read The Real Cure for Eye Strain (I wrote it based on practical experience). The breaks need to be at 20 minute intervals.

The one feature I see lacking in all rest reminder software, is taking into account system restarts. If eyes are strained for an hour and the system restarts, the strain counter starts from zero, like as though the eyes aren't strained already. I'm in the process of developing a program to solve that. But if Mint developers can have a built-in functionality that reminds people to take rest, it'd need to have some practical controls and functionality which I can help with, based on my experience with chronic eye strain and recovery.

As for redshift, I remember it had a bug that it wouldn't work if it wasn't connected to the internet. Besides, I want to manually set the redshift intensity based on the time of the day that suits me. Whether or not the ambient brightness is detectable by the system. People who create apps like redshift haven't taken into account a lot of factors like these, and like I showed, the GUI doesn't have useful options either. This is why I requested if Mint developers could build the functionality into Mint.
nachlese
Level 4
Level 4
Posts: 413
Joined: Sun Apr 09, 2023 11:27 am

Re: Default eye rest and nightlight feature

Post by nachlese »

NavN wrote: Fri May 19, 2023 2:31 am ...
As for redshift, I remember it had a bug that it wouldn't work if it wasn't connected to the internet. Besides, I want to manually set the redshift intensity based on the time of the day that suits me. Whether or not the ambient brightness is detectable by the system. People who create apps like redshift haven't taken into account a lot of factors like these, ...
That bug likely wasn't one, but has to do with geoclue - a location service which needed a registration.
But as soon as you use a VPN, that is less than helpful anyway when the changes occur based upon the time zone the VPN server is located in ...

I use a very simple configuration with explicitly set latitude and longitude - of course I'd need to change that when I travel across multiple time zones, but that rarely happens (and then it's easier to just adjust the system clock than set a different location).

Code: Select all

cat ./.config/redshift/redshift.conf 
[redshift]
location-provider=manual

temp-day=6500
temp-night=5000

transition=1

adjustment-method=randr

[manual]
lat=51.300000
lon=12.300000
Without the latitude and longitude in the config, the panel applet of redshift-gtk can be used to switch color temp with one click at any time.
The only UI I see for redshift is this https://ibb.co/mTZ11dR
This is the UI I meant.

redshift is also easily scriptable
NavN
Level 1
Level 1
Posts: 14
Joined: Thu May 18, 2023 2:06 pm

Re: Default eye rest and nightlight feature

Post by NavN »

nachlese wrote: Fri May 19, 2023 3:03 am That bug likely wasn't one, but has to do with geoclue
Yes, I'm aware it was a problem with geoclue, but if redshift doesn't work just because it can't find a lat long, it's a bug that needs to be fixed. Do have a look at how simple Ubuntu's built-in nightshift app is. It of course lacks the feature that allows manually setting different intensities for different times of the day, but it's better than having to find a conf file and type in some settings. Thanks for pointing out the configurability of Redshift.
User avatar
kc1di
Level 17
Level 17
Posts: 7853
Joined: Mon Sep 08, 2008 8:44 pm
Location: Maine USA

Re: Default eye rest and nightlight feature

Post by kc1di »

A couple other points about redshift.
1. If you are using a VPN geoclue will not be able to get the correct location.
2. You can modify the menu launch by right clicking the menu button and selecting Configure, Menu tab, open menu editor and the accessories and redshift. Click on properties and modify the execute line by adding -l (lat:long) -t (temp ) -t looks like this -t 6500:3300 Day/night.

so it looks like this

Code: Select all

redshift-gtk -l <your location in lat:long > -t 6500:3300
or what ever temp setting you prefer.


good luck.
Easy tips : https://easylinuxtipsproject.blogspot.com/ Pjotr's Great Linux projects page.
Linux Mint Installation Guide: http://linuxmint-installation-guide.rea ... en/latest/
Registered Linux User #462608
Hoser Rob
Level 19
Level 19
Posts: 9978
Joined: Sat Dec 15, 2012 8:57 am

Re: Default eye rest and nightlight feature

Post by Hoser Rob »

nachlese wrote: Thu May 18, 2023 3:31 pm ... the website, along with configuration examples, provides a link to a Plasmoid (Plasma thingie for the KDE/Plasma desktop)
which apparently does provide a GUI interface.
I have no use for it, don't use QT apps when I can avoid it - and don't know it....
That's a KDE Plasma widget and it's not going to work on a non KDE desktop. This has zilch to do with Qt ... there's a ridiculous amount of totally uninformed FUD about Qt on this forum. SMplayer is a Qt program, it's quite popular with Mint users, where are all the problems with that?

My main box runs MX 21 KDE, and Plasma actually has redshift built in, with settings for temp and on/off times. That widget is for more adjustments, which I haven't installed though I do use the redshift (that laptop screen has a slight blue cast to it). I can't resist pointing out that KDE uses almost exactly the same RAM at boot.
nachlese
Level 4
Level 4
Posts: 413
Joined: Sun Apr 09, 2023 11:27 am

Re: Default eye rest and nightlight feature

Post by nachlese »

Hoser Rob wrote: Fri May 19, 2023 10:13 am That's a KDE Plasma widget and it's not going to work on a non KDE desktop.
I know. I just said that I don't know it and don't use it, not that there where problems.
Hoser Rob wrote: Fri May 19, 2023 10:13 am This has zilch to do with Qt ... there's a ridiculous amount of totally uninformed FUD about Qt on this forum.
I wasn't trying to perpetuate whatever FUD there might be, but:
Qt is involved in the end.
... dependencies ... KDE and/or plasma without QT?

Cheers!
User avatar
KMD2023
Level 1
Level 1
Posts: 11
Joined: Fri Mar 24, 2023 2:22 pm

Re: Default eye rest and nightlight feature

Post by KMD2023 »

NavN wrote: Fri May 19, 2023 2:31 am The only UI I see for redshift is this https://ibb.co/mTZ11dR
@KMD2023: Three hours until a break is too less rest. Please read The Real Cure for Eye Strain (I wrote it based on practical experience). The breaks need to be at 20 minute intervals.
...
20 Minutes! I thought I was doing good at 3 hrs, I need to negotiate better :).

Thanks for the link!

KMD2023
KMD2023
NW USA
Linux Hobbyist - Made the full switch Mar 2023
- "Backups are your friend, and Timeshift is a friend with benefits!"
NavN
Level 1
Level 1
Posts: 14
Joined: Thu May 18, 2023 2:06 pm

Re: Default eye rest and nightlight feature

Post by NavN »

Alternative to Redshift: Just found out that there's a really simple program named sct, which can be installed with

Code: Select all

sudo apt -y install sct
. Am considering creating a GUI which allows changing the intensity with GUI widgets.
igmint
Level 3
Level 3
Posts: 129
Joined: Fri Jan 10, 2020 1:52 pm

Re: Default eye rest and nightlight feature

Post by igmint »

Brightness Controller is the only GUI application.
https://github.com/lordamit/Brightness
BrightnessController.png
translated by googlemachine. UTC+3:00
Post Reply

Return to “Suggestions & Feedback”