Last active
July 2, 2018 23:31
-
-
Save xarinatan/b9c350b68b9a1d5ce938489f4e3d1580 to your computer and use it in GitHub Desktop.
Same as bedshift.sh, but with a curve for night shifts.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#/bin/bash | |
#This bash file will run in a loop until killed, and edit the color temperature throughout the day based on the times below. | |
while true; do | |
curTime=$(date +"%k") | |
if (( $curTime >= 9 && $curTime < 18 )); then #between 9am and 6pm | |
redshift -O 2500k #Bed time for night shifters | |
elif (( $curTime >= 18 && $curTime < 21 )); then | |
redshift -O 2200k #Set color temp of 4200k | |
elif (( $curTime >= 21 && $curTime < 23 )); then | |
redshift -O 3200k #etc | |
elif (( $curTime >= 23 || $curTime >= 0 && $curTime < 6 )); then | |
redshift -O 3400k | |
elif (( $curTime >= 6 && $curTime < 9 )); then | |
redshift -O 2000k | |
fi | |
sleep 30 | |
done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
note that just like the bedshift script this has the issue with Wayland that it overlays the color every time instead of just setting the color temperature. the only fix i found was to run Xorg instead..