12345678910111213141516171819202122 |
- #!/bin/sh
- STEP_BRIGHTNESS=10
- NOTIF_DURATION=2
- # Get current value
- current_brightness=$(brightness_get)
- # Compute new brightness value
- new_brightness=0
- if [ ${current_brightness} -gt ${STEP_BRIGHTNESS} ]; then
- let new_brightness=${current_brightness}-${STEP_BRIGHTNESS}
- fi
- # Change brightness
- if [ ${new_brightness} -ne ${current_brightness} ]; then
- brightness_set ${new_brightness}
- fi
- # Notif
- notif_set ${NOTIF_DURATION} " BRIGHTNESS: ${new_brightness}%%"
- exit 0
|