dots-of-war/eww-laptop/.config/eww/scripts/get-brightness

8 lines
155 B
Text
Raw Permalink Normal View History

#!/usr/bin/env bash
max=$(brightnessctl max)
current=$(brightnessctl get)
percentage=$(echo "scale=1; $current / $max * 100" | bc -l)
echo "$percentage"