ADD external brighntess controller
This commit is contained in:
parent
1f866f554c
commit
7be783cb1b
|
@ -0,0 +1,21 @@
|
||||||
|
#!/bin/bash
|
||||||
|
|
||||||
|
# control external monitor brightness using ddc/ci
|
||||||
|
|
||||||
|
level="$1"
|
||||||
|
|
||||||
|
if [ $level -lt 0 ] || [ $level -gt 100 ]; then
|
||||||
|
echo "brightness must be between 0 and 100"
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
|
||||||
|
dpys=$(ddcutil detect --async | grep Display | cut -f2 -d' ' | tr '\n' ' ')
|
||||||
|
|
||||||
|
# NOTE: as nice as it would be, it seems that I can't run all of these in
|
||||||
|
# parallel since ddc will get confused (idk why)
|
||||||
|
for d in $dpys; do
|
||||||
|
ddcutil setvcp 10 "$level" -d "$d" > /dev/null
|
||||||
|
done
|
||||||
|
|
||||||
|
wait
|
||||||
|
|
Loading…
Reference in New Issue