#!/bin/sh

STEP_BRIGHTNESS=10
NOTIF_DURATION=2

# Get current value
current_brightness=$(brightness_get)

# Compute new brightness value
let new_brightness=${current_brightness}+${STEP_BRIGHTNESS}
if [ ${new_brightness} -gt 100 ]; then
    new_brightness=100
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
