summaryrefslogtreecommitdiff
path: root/scripts/gamma.sh
blob: 0117dd5b567b70e4366a8b0532f937a2ff4f71b9 (plain)
1
2
3
4
5
6
7
8
9
10
#!/bin/bash
MAIN_DP=DP-2;  

v=$1

if [ $# -ne 0 ]; then
	xrandr --output $MAIN_DP --gamma $(paste -d" " <(xrandr | grep " connected" | cut -f1 -d " ") <(xrandr --current --verbose | grep "Gamma" | cut -f7 -d" " | cut -f1 -d":" | xargs -I % echo "1/%") | grep $MAIN_DP | cut -d" " -f2 | xargs -I % echo "%*$v" | bc -l)
else
	xrandr --output $MAIN_DP --gamma 1.3
fi