#!/usr/bin/env sh
######################################################################
# @author : swytch
# @file : backlight_notify
# @license : MIT
# @created : Wednesday May 20, 2020 17:53:36 CEST
#
# @description : send a notification with xbacklight value
current=$(cat /sys/class/backlight/intel_backlight/brightness)
max=$(cat /sys/class/backlight/intel_backlight/max_brightness)
step=$(expr $max / 20)
level=$(expr $(expr $current / $step) \* 5)
dunstify -r 100001 -u "low" "Current xBacklight value :" "$level%"