Create sb-bghitness, show brightness in the bar.

script to add brightness to the dwmblocks.
This commit is contained in:
Alaa Eddine 2024-05-03 12:23:53 +01:00 committed by GitHub
parent cf4a12acb3
commit 3fb60852de
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -0,0 +1,13 @@
#!/bin/sh
# show the current brightness level.
case $BLOCK_BUTTON in
1) setsid -w -f "$TERMINAL" -e brightnessctl; pkill -RTMIN+20 "${STATUSBAR:-dwmblocks}" ;;
3) notify-send "💡 Brightness module" "\- Shows brightness level ☀️." ;;
6) setsid -f "$TERMINAL" -e "$EDITOR" "$0" ;;
esact
brightness=$(brightnessctl -m | grep -m 1 "backlight" | cut -d "," -f 4)
echo "💡 $brightness"