From 8fb98d64d3bfbcaa21be9cfcb30121d96b83452e Mon Sep 17 00:00:00 2001 From: SinTan1729 Date: Sun, 26 Jun 2022 18:17:54 -0500 Subject: [PATCH] added brightness-adjust.sh --- brightness-adjust.sh | 15 +++++++++++++++ 1 file changed, 15 insertions(+) create mode 100644 brightness-adjust.sh diff --git a/brightness-adjust.sh b/brightness-adjust.sh new file mode 100644 index 0000000..cfb7902 --- /dev/null +++ b/brightness-adjust.sh @@ -0,0 +1,15 @@ +#!/bin/sh + +# This is a script to set my external monitor's brightness +# to high (70%) or low (40%) easily. It uses ddcutil to access +# the monitor's settings. When used in conjunction with heliocron, +# it can manage the monitor brightness based on sunrise or sunset, +# which can be useful if you like to work in natural light. + +if [ $1 == "high" ]; then + ddcutil setvcp 10 70 && echo "Monitor brightness set to 70%" +elif [ $1 == "low" ]; then + ddcutil setvcp 10 40 && echo "Monitor brightness set to 40%" +else + echo "Please pass high/low" +fi