brightness-i2c: change storage from env var to file

This commit is contained in:
Martin Sekera 2025-01-18 18:46:18 +01:00
parent 38ee4f1809
commit b7f290e0fa
2 changed files with 9 additions and 2 deletions

View file

@ -2,8 +2,14 @@
OPERATOR="${1}"
AMOUNT="${2}"
F="$XDG_RUNTIME_DIR/over/monitors-i2c"
BUSES=(${(s/:/)OVER_ENV_MONITORS_I2C})
if [[ ! -e "$F" ]]; then
exit 1
fi
MONITORS_I2C=$(cat $XDG_RUNTIME_DIR/over/monitors-i2c)
BUSES=(${(s/:/)MONITORS_I2C})
for BUS in ${BUSES}
do