nixos-config/home-manager/wayland/eww/scripts/brightness

8 lines
251 B
Plaintext
Raw Normal View History

2024-05-11 19:17:30 -04:00
#!/usr/bin/env bash
brightnessctl -me | cut -d, -f4 | tr -d '%'
device=$(brightnessctl -m | head -n 1 | cut -d, -f1)
while true; do
inotifywait /sys/class/backlight/"$device"/brightness &>/dev/null
brightnessctl -me | cut -d, -f4 | tr -d '%'
done