brightness_down.sh 798 B

1234567891011121314151617181920212223
  1. #!/bin/bash
  2. # min_brightness=0
  3. # current_brightness=$(cat /sys/class/backlight/radeon_bl0/brightness)
  4. #
  5. # # current_brightness=$(expr $current_brightness - 12)
  6. # current_brightness=$((current_brightness - 5))
  7. #
  8. # if [ $current_brightness -ge $min_brightness ]
  9. # then
  10. # echo $current_brightness > /sys/class/backlight/radeon_bl0/brightness
  11. # notify-send -t 500 -i dialog-information "Brightness $current_brightness"
  12. # else
  13. # current_brightness=$min_brightness
  14. # echo $current_brightness > /sys/class/backlight/radeon_bl0/brightness
  15. # notify-send -t 500 -i dialog-information "Brightness $current_brightness"
  16. # fi
  17. brightnessctl set 5-
  18. current_brightness=$(brightnessctl get)
  19. notify-send -t 500 -i dialog-information "Brightness $current_brightness"