als autodetection working

Now it will always use the first als found on the system. Auto detection if only 1 such device exists
This commit is contained in:
Theluga 2023-12-21 18:39:10 +00:00 committed by GitHub
parent 4a4db6e2be
commit 0fb675b825
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -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