From d082e59dfec5bf3325dcb8b2924aa4ae4a1e785d Mon Sep 17 00:00:00 2001 From: Adrian Amaglio Date: Thu, 2 Feb 2023 08:20:13 +0100 Subject: [PATCH] redshift and resolution --- redshift.sh | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/redshift.sh b/redshift.sh index 0bc24cd..9daa57f 100755 --- a/redshift.sh +++ b/redshift.sh @@ -4,5 +4,14 @@ if [ "$#" -ne 1 ] ; then echo "Usage : $0 +/-" >&2 exit 1 fi - -xrandr --output "$(xrandr --listactivemonitors | grep -o '[[a-zA-Z0-9\-]\{2,\}$' -m 1)" --gamma 1:0.3:0.3 --brightness 1.3 +red='--gamma 1:.6:.6 --brightness 0.6' +size='--rate 60 --mode 1920x1080 --fb 1920x1080 --panning 1920x1080*' +i=0 +same='' +xrandr --listactivemonitors | tail -n +2 | cut -d ' ' -f 6 | while read monitor ; do + xrandr --output "$monitor" $red $size $same + if [ "$i" -eq 0 ] ; then + ((i=i+1)) + same="--same-as $monitor" + fi +done