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

@ -8,7 +8,8 @@ OVER_PROMPT_TITLE=""
which ddcutil > /dev/null
if [[ $? -eq 0 ]]; then
local I2C_IDS=($(ddcutil detect --terse | grep "I2C bus" | sed "s/^.*-//"))
export OVER_ENV_MONITORS_I2C=${(j|:|)I2C_IDS}
mkdir -p $XDG_RUNTIME_DIR/over
echo ${(j|:|)I2C_IDS} > $XDG_RUNTIME_DIR/over/monitors-i2c
fi
if [[ -a "$OVER_PROMPT_CFG" ]]; then