diff options
-rwxr-xr-x | bin/gamma | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/bin/gamma b/bin/gamma new file mode 100755 index 0000000..57cdc7f --- /dev/null +++ b/bin/gamma @@ -0,0 +1,16 @@ +#!/bin/bash + +if [[ ${#@} == 1 ]]; then + red=$1 + blue=$1 + green=$1 +else + red=$1 + blue=$2 + green=$3 +fi + +declare -a outputs=( $(xrandr --query --current | perl -nle 'm{^(\S+) connected} and print $1' ) ) +for o in "${outputs[@]}"; do + xrandr --output "$o" --gamma "${red}:${green}:${blue}" +done |