brightness-i2c: fix log spam on denied access, move monitor detection from prompt to zshrc
This commit is contained in:
parent
89bc29d5b0
commit
b6d069b90a
2 changed files with 12 additions and 7 deletions
|
@ -5,13 +5,6 @@ zmodload zsh/datetime
|
|||
OVER_PROMPT_CFG="/etc/over/env/prompt.cfg"
|
||||
OVER_PROMPT_TITLE=""
|
||||
|
||||
which ddcutil > /dev/null
|
||||
if [[ $? -eq 0 ]]; then
|
||||
local I2C_IDS=($(ddcutil detect --terse | grep "I2C bus" | sed "s/^.*-//"))
|
||||
mkdir -p $XDG_RUNTIME_DIR/over
|
||||
echo ${(j|:|)I2C_IDS} >! $XDG_RUNTIME_DIR/over/monitors-i2c
|
||||
fi
|
||||
|
||||
if [[ -a "$OVER_PROMPT_CFG" ]]; then
|
||||
source "$OVER_PROMPT_CFG"
|
||||
fi
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue