#!/bin/bash
# Brightness control with dunst notification

case "$1" in
    up)
        brightnessctl set +5%
        ;;
    down)
        brightnessctl set 5%-
        ;;
esac

BRIGHTNESS=$(brightnessctl -m | awk -F, '{print $4}' | tr -d '%')
dunstify -a "brightness" -u low -r 9998 -h int:value:${BRIGHTNESS} " ${BRIGHTNESS}%"
