xfce4-night-mode/xfce4-night-mode-redshift.sh
bimlas 343f208cd8 Use Redshift's "Night" period instead of "Daytime"
Daytime -> Transition -> Night
2020-04-14 20:54:06 +02:00

18 lines
499 B
Bash
Executable file

#!/bin/bash
# XFCE Night Mode controlled by Redshift
#
# https://gitlab.com/bimlas/xfce4-night-mode (main repository)
# https://github.com/bimlas/xfce4-night-mode (mirror, please star if you like the plugin)
if ( LC_ALL='C' redshift -vo 2> /dev/null | grep 'Period: Night' > /dev/null ); then
mode='night'
else
mode='day'
fi
"$(dirname "$0")/xfce4-night-mode.sh" "$mode" | sed '/<tool>/,/<\/tool>/ d'
echo '<tool>
Night mode defined by RedShift
Click to toggle mode for a while
</tool>'