You are not logged in.
Redshift adjusts the color temperature of your screen according to your surroundings. This may help your eyes hurt less if you are working in front of the screen at night.
sudo apt-get install redshift-gtk
copy config file from jonis.dk;
http://jonls.dk/redshift/
~/.config/redshift.conf
edit your latitude and longitude.
edit your preferred colour temperatures day and night.
note: for a single screen;
[randr]
screen=0
save config file and start redshift;
redshift
add to ~/.config/openbox/autostart
redshift &
ease those tired eyes
Offline
I've used f.lux in Windows and it works nice.
Might have to give this a look-see.
The meaning of life is to just be alive. It is so plain and so obvious
and so simple. And yet everybody rushes aroound in a great panic
as if it were necessary to achieve something beyond themselves.
- Alan Watts
Offline
+1 for redshift. I read about it in Linux Voice and now use it on all of my BL installs. If you'd rather not be bothered with configuration files, also install redshift-gtk which provides a quick way to change the configuration of, or start/stop, redshift via a tray icon. I believe installing redshift-gtk will automatically install redshift as well.
Although not available in the repos, there's another one called blueshift, that offers more configuration options. Check it out here: https://github.com/maandree/blueshift. However, redshift meets my needs so I've not really looked into blueshift in any detail.
Last edited by KrunchTime (2015-11-12 08:35:25)
Offline
If you want simpler/lighter alternative this script (borrowed from the LinuxBBQ) is great too; no bloat, job done.
bbqshift
#!/bin/bash
RR=1
GG=1
BB=1
LL=1
NR=1
NG=1
NB=1
NL=1
MIN=0 # min gamma
MAX=200 # max gamma
CON=`xrandr -q | grep con | cut -d " " -f 1 | xargs`
echo "Detected connectors are: $CON"
echo "Which do you want to manipulate?"
array=( $(echo $CON) )
select MON in "${array[@]}"; do
info() {
clear
echo "Working on $MON"
echo "r/R g/G b/B to move gamma"
echo "l/L to adjust brightness"
echo "s to save, q to reset and quit."
}
set_val() {
case $1 in
RED)
RR=$2
NR=$(echo "$RR/100" | bc -l)
;;
GREEN)
GG=$2
NG=$(echo "$GG/100" | bc -l)
;;
BLUE)
BB=$2
NB=$(echo "$BB/100" | bc -l)
;;
BRIGHTNESS)
LL=$2
NL=$(echo "$LL/100" | bc -l)
;;
esac
info
}
inc_gamma() {
let "VAL = $1 + 5"
if (( "$VAL" < "$MAX" )); then
set_val $2 $VAL
echo "$2 increased to $VAL"
else
echo "$2 cannot be increased above or to $MAX."
fi
info
}
dec_gamma() {
let "VAL = $1 - 5"
if (( "$VAL" > "$MIN" )); then
set_val $2 $VAL
echo "$2 decreased to $VAL"
else
echo "$2 cannot be decreased below or to $MIN."
fi
info
}
info
while read -n1 -s; do
case $REPLY in
R) inc_gamma $RR "RED" ;;
r) dec_gamma $RR "RED" ;;
G) inc_gamma $GG "GREEN" ;;
g) dec_gamma $GG "GREEN" ;;
B) inc_gamma $BB "BLUE" ;;
b) dec_gamma $BB "BLUE" ;;
L) inc_gamma $LL "BRIGHTNESS" ;;
l) dec_gamma $LL "BRIGHTNESS" ;;
s|S)
echo "xrandr --output $MON --gamma $NR:$NG:$NB --brightness $LL" > ~/xrandrconf
chmod a+x ~/xrandrconf
echo "Saved as ~/xrandrconf"
exit 0
;;
q|Q)
xrandr --output $MON --gamma 1.0:1.0:1.0 --brightness 1.0
exit 0
;;
esac
xrandr --output $MON --gamma $NR:$NG:$NB --brightness $NL > /dev/null 2>&1
done
done
To install it systemwide:
cd /path/to/bbqshift
sudo mv bbqshift /usr/local/bin/
sudo chmod a+x /usr/local/bin/bbqshift
Offline
If you want simpler/lighter alternative this script (borrowed from the LinuxBBQ) is great too; no bloat, job
Wow, that is pretty nifty, thx for sharing Snap. Have to check this linuxbbq out sometime.
Offline
@nobody
Offline
I installed redshift-gtk from synaptic.
Running the command (redshift-gtk) from the CLI does nothing. I found a command on the ArchWiki to run it, so I created a quick one line script to run it in the background:
#!/bin/bash
redshift -l LAT:LON &
Of course I put in my latitude and longitude instead of LAT/LON.
I heard rumours that redshift-gtk installs an item in my system tray, but I don't see it in my Tint2 panel.
Thoughts?
EDIT: Logging out and logging back in did nothing to change this behaviour. Perhaps all is working as intended? For now I am using my script, but having a GUI for it would be nice.
Last edited by Temetka (2015-11-12 17:49:48)
The meaning of life is to just be alive. It is so plain and so obvious
and so simple. And yet everybody rushes aroound in a great panic
as if it were necessary to achieve something beyond themselves.
- Alan Watts
Offline
@Temetka
This is how I use redshift;
1. Install redshift via synaptic (redshift-gtk should give an icon in the tint2 systray)
Start the program redshift-gtk instead of redshift, with the same arguments as you would pass to redshift. This will create an icon for Redshift in the system tray. The icon will allow you to toggle Redshift on and off. Thanks goes to the Tango Desktop Project for the icon. Redshift GTK requires at least Python 3.2 (since Redshift 1.9).
2. Copy the sample redshift config file at jonls.dk to;
~/.config/redshift.conf
Edit conf file to your requirements...
3. Add;
redshift &
to ~/.config/openbox/autostart
Last edited by mrneilypops (2015-11-12 18:51:23)
Offline
I'm also part of the cult.. I love it .
(and it gets my lat lon through the ip address)
Last edited by pingu (2015-11-12 18:28:16)
"Chuck Norris can compile syntax errors."
Offline
sudo apt-get install redshift-gtk
Don't you mean:
sudo apt-get install gtk-redshift
12 Nov 15 | 17:57:46 ~
$ ser redshift
alias ser = aptitude search
p gtk-redshift - Adjusts the color temperature of your screen with GTK+ int
p redshift - Adjusts the color temperature of your screen
12 Nov 15 | 17:57:48 ~
$
Debian 12 Beardog, SoxDog and still a Conky 1.9er
Offline
^ That's my fault. I was using Unstable when I checked synaptic. In Testing and Unstable, redshift-gtk is now a transitional dummy package. For Stable (Jessie), redshift-gtk is the correct package. I apologize to others who may have wasted their time trying to get gtk-redshift to work under Jessie.
Last edited by KrunchTime (2015-11-12 21:28:58)
Offline
^ Easy mistake to make, as in both cases the executable is redshift-gtk.
I'm trying it, but I'm not sure my eyes like it.
Be excellent to each other, and...party on, dudes!
BunsenLabs Forum Rules
Tending and defending the Flame since 2009
Offline
^ Once you get used to it, you'll not want to be without it. My eyes didn't care much for it at first either.
Offline
i wouldn't say my eyes, but my sense of aesthetics doesn't like it... 8.(
Offline
^ Same here. While I applaud the attempt at ergonomic color shifting, I prefer a consistent color temperature. I can't imagine watching films or cartoons, for example, with the monitor red-shifted to 3500K.
Be excellent to each other, and...party on, dudes!
BunsenLabs Forum Rules
Tending and defending the Flame since 2009
Offline
Trust me...you'll get used to it. Of course, everyone is different. I'm even going to install f.lux in my Windows VMs because I love redshift so much.
Last edited by KrunchTime (2015-11-13 09:10:32)
Offline
@mrneilypops: Thank you.
I'm using 5500K for day/night (same as "Midday Sun" in f.lux) with no change to brightness and gamma=0.8:0.9:0.7.
On my ageing laptop this has an effect similar to Cinema mode on my TV.
Offline
hi i put a launcher of redshift in my tint2 config in order to use it when i want .
just add for the "clock_rclick_command" this :
# Clock
time1_format = %H:%M
time1_font = Liberation Sans 9
#time2_format = %A %d %B
#time2_font = Liberation Sans 6
clock_font_color = #b5b5b5 100
clock_padding = 12 4
clock_background_id = 0
clock_lclick_command = gsimplecal
clock_rclick_command =redshift-gtk -l 33.578456:-7.606636 -t 6500K:3700K -g 0.8
this doesn't work with a conf file
Last edited by wagmic (2017-05-14 14:47:40)
La liberté, personne ne peut l’expliquer mais tout le monde peut la comprendre.Cecilia Meireles
Tout ce qui n'est pas donné ou partagé est perdu (proverbe tsigane)
Offline