Do not error out if xrandr or xinput is missing while DISPLAY is set

This commit is contained in:
crater2150 2024-07-22 17:51:14 +02:00
parent c5548aaa22
commit 9793f10c97

View file

@ -357,7 +357,8 @@ batstat() {
done
}
if [[ $DISPLAY ]] && xinput | grep -q Wacom && xrandr | grep -q eDP1; then
if [[ $DISPLAY ]] && exists xinput && exists xrandr && \
xinput | grep -q Wacom && xrandr | grep -q eDP1; then
xrandr() {
command xrandr $@
for dev in $(xinput | grep Wacom | grep -oP '(?<=id=)\d*'); do