mirror of
https://github.com/davegallant/nix-config
synced 2025-08-06 07:13:40 +00:00
Ensure that digits below 20 show a red battery percentage
This commit is contained in:
@@ -11,7 +11,8 @@ Battery() {
|
||||
capacity=$(grep -hs ^ /sys/class/power_supply/BAT0/capacity)
|
||||
if [ -n "$capacity" ]; then
|
||||
case $capacity in
|
||||
[0-1][0-9]{0,1}) colour=$red ;;
|
||||
[0-9]) colour=$red ;;
|
||||
[0-1][0-9]) colour=$red ;;
|
||||
[2-3][0-9]) colour=$yellow ;;
|
||||
*) colour=$green ;;
|
||||
esac
|
||||
|
Reference in New Issue
Block a user