lukelex / dotfiles

My Personal Linux Environment Configurations
8 stars 0 forks source link

Brightness value of external monitor is always shown as 0! #2

Open lamyergeier opened 2 years ago

lamyergeier commented 2 years ago

In dotfiles/monitors at master · lukelex/dotfiles, monitors brightness get always gives 0!

Its because monitors=$(sudo ddcutil detect | grep "I2C bus" | grep -o .$); last_monitor=$(echo $monitors | grep -o .$), here last_monitor is laptop screen which is not supported by ddcutil.

Solution

Instead of sudo ddcutil detect | grep "I2C bus" use

sudo ddcutil detect | sed -r -n -e "/Display [0-9]+/{n;s/I2C bus(.*)/\1/p;}"

Refer

lukelex commented 2 years ago

I'll give this a try this weekend. Thanks for taking the time to report it ❤️