aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSilvio Rhatto <rhatto@riseup.net>2023-01-01 10:16:39 -0300
committerSilvio Rhatto <rhatto@riseup.net>2023-01-01 10:16:39 -0300
commit82f2bed62b402dc82432215e91ba524a583ebaba (patch)
tree9fe141e945f48677e12c3d27123f4ae8241c9c11
parentf0f3e8fd8089279dda9570a79a7eed0201b2895e (diff)
downloadutils-x11-82f2bed62b402dc82432215e91ba524a583ebaba.tar.gz
utils-x11-82f2bed62b402dc82432215e91ba524a583ebaba.tar.bz2
Fix: xbrightness: do not automatically exit when 'xrandr --brightness' fails
-rwxr-xr-xxbrightness5
1 files changed, 4 insertions, 1 deletions
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!"