neodotfiles/user/.config/awesome/ui/widgets/brightness

11 lines
208 B
Text
Raw Normal View History

2022-09-12 23:22:46 +00:00
#!/bin/bash
2022-07-20 02:46:41 +00:00
brt=$(xbacklight -get)
if [ "$brt" = "100.000000" ]; then
2022-09-12 23:22:46 +00:00
icon=""
2022-07-20 02:46:41 +00:00
elif [ "$brt" \> "50%.*" ]; then
2022-09-12 23:22:46 +00:00
icon=""
2022-07-20 02:46:41 +00:00
elif [ "$brt" \< "49%.*" ]; then
2022-09-12 23:22:46 +00:00
icon=""
2022-07-20 02:46:41 +00:00
fi
2022-09-12 23:22:46 +00:00
echo "$icon ${brt%.*}%"