summaryrefslogtreecommitdiff
path: root/bin/gamma
diff options
context:
space:
mode:
Diffstat (limited to 'bin/gamma')
-rwxr-xr-xbin/gamma10
1 files changed, 6 insertions, 4 deletions
diff --git a/bin/gamma b/bin/gamma
index 57cdc7f..b684b4f 100755
--- a/bin/gamma
+++ b/bin/gamma
@@ -2,15 +2,17 @@
if [[ ${#@} == 1 ]]; then
red=$1
- blue=$1
green=$1
+ blue=$1
+ brightness=1
else
red=$1
- blue=$2
- green=$3
+ green=$2
+ blue=$3
+ brightness=${4:-1}
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}"
+ xrandr --output "$o" --gamma "${red}:${green}:${blue}" --brightness "$brightness"
done