dotfiles/bin/brightness

19 lines
294 B
Plaintext
Raw Permalink Normal View History

2023-08-09 22:51:55 +00:00
#!/usr/bin/env sh
set -x
DEVICE=pulse
NAME=Master
URGENCY=low
EXPIRE=5000
brightnessctl $@
LEVEL=$(brightnessctl -m | awk -F, '{print $4}' | tr -d %)
notify-send -u $URGENCY \
-h "int:value:$LEVEL" \
-h string:x-dunst-stack-tag:brightness_notif \
-t $EXPIRE \
"BRIGHTNESS: $LEVEL"