]> gitweb.fluxo.info Git - utils-x11.git/commitdiff
Fix: xbrightness: do not automatically exit when 'xrandr --brightness' fails
authorSilvio Rhatto <rhatto@riseup.net>
Sun, 1 Jan 2023 13:16:39 +0000 (10:16 -0300)
committerSilvio Rhatto <rhatto@riseup.net>
Sun, 1 Jan 2023 13:16:39 +0000 (10:16 -0300)
xbrightness

index f86f72f1f0367c2f90e93d2571855dd3f305c76a..6b5f83fbe50334b16b08e157bcd5eeb16542082d 100755 (executable)
@@ -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!"