From: Silvio Rhatto Date: Sun, 1 Jan 2023 13:16:39 +0000 (-0300) Subject: Fix: xbrightness: do not automatically exit when 'xrandr --brightness' fails X-Git-Url: https://gitweb.fluxo.info/?a=commitdiff_plain;h=82f2bed62b402dc82432215e91ba524a583ebaba;p=utils-x11.git Fix: xbrightness: do not automatically exit when 'xrandr --brightness' fails --- diff --git a/xbrightness b/xbrightness index f86f72f..6b5f83f 100755 --- a/xbrightness +++ b/xbrightness @@ -202,8 +202,11 @@ elif $mth_xrandr then displays=$(xrandr -q | grep " connected" | sed -e 's| .*||') + # Apply brightness configuration for each available display for display in $displays; do - xrandr --output "$display" --brightness "$val_new" + echo "Setting brightness to $val_new at $display..." + # Use "|| true" to not exit on any errors at this stage + xrandr --output "$display" --brightness "$val_new" || true done else >&2 echo "No low-level-method chosen!"