diff options
author | davidovski <david@davidovski.xyz> | 2021-10-09 22:20:41 +0100 |
---|---|---|
committer | davidovski <david@davidovski.xyz> | 2021-10-09 22:20:41 +0100 |
commit | 01ced0b7ce47d279789efb2dc70d1cd009ac56ad (patch) | |
tree | 6ece604b8ae3476d2d70c9c9d42f86fe607990da /scripts/gamma.sh |
initial commit
Diffstat (limited to 'scripts/gamma.sh')
-rwxr-xr-x | scripts/gamma.sh | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/scripts/gamma.sh b/scripts/gamma.sh new file mode 100755 index 0000000..0117dd5 --- /dev/null +++ b/scripts/gamma.sh @@ -0,0 +1,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 |