From 0fb675b825c887a6b30eda6b6d3f846316dda5b2 Mon Sep 17 00:00:00 2001 From: Theluga <96307393+Theluga@users.noreply.github.com> Date: Thu, 21 Dec 2023 18:39:10 +0000 Subject: [PATCH] als autodetection working Now it will always use the first als found on the system. Auto detection if only 1 such device exists --- autobrightness.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/autobrightness.sh b/autobrightness.sh index 6248382..4c64893 100644 --- a/autobrightness.sh +++ b/autobrightness.sh @@ -37,7 +37,7 @@ MonitorBrightness=/sys/class/backlight/intel_backlight/brightness #my sensor keep changing places, this way it will always be found with * if you have lots of sensors -AnbientSensorIlluminance=`echo realpath /sys/bus/iio/devices/iio:*/in_illuminance_raw` +AnbientSensorIlluminance=`echo "$(set -- $(realpath /sys/bus/iio/devices/iio:*/in_illuminance_raw); echo "$1")"` while getopts i:d: flag; do