dwmblock-brightness (394B)
1 #!/bin/sh 2 # dwmblocks script for brightness information 3 case "$BUTTON" in 4 1) 5 pkill -RTMIN+3 dwmblocks;; 6 3) brightnessctl set '100%';; 7 4) 8 brightnessctl set '10%-' 9 pkill -RTMIN+3 dwmblocks 10 ;; 11 5) 12 brightnessctl set '10%+' 13 pkill -RTMIN+3 dwmblocks 14 ;; 15 6) "$TERMINAL" -e "$EDITOR" "$0" ;; 16 esac 17 18 printf ' %s' "$(brightnessctl --machine-readable | cut -d, -f4)"