eww fix battery for desktop
This commit is contained in:
@@ -3,7 +3,9 @@ stat=$(cat /sys/class/power_supply/AC/online)
|
||||
|
||||
class="batteryFull"
|
||||
|
||||
if [[ $stat == 1 ]]; then
|
||||
if [ ! -d "/sys/class/power_supply/BAT0" ]; then
|
||||
class="batteryFull"
|
||||
elif [[ $stat == 1 ]]; then
|
||||
class="batteryCharging"
|
||||
elif [[ $bat -le 10 ]]; then
|
||||
class="batteryEmpty"
|
||||
|
||||
@@ -3,7 +3,9 @@ stat=$(cat /sys/class/power_supply/AC/online)
|
||||
|
||||
icon=""
|
||||
|
||||
if [[ $stat == 1 ]]; then
|
||||
if [ ! -d "/sys/class/power_supply/BAT0" ]; then
|
||||
icon=""
|
||||
elif [[ $stat == 1 ]]; then
|
||||
icon=""
|
||||
elif [[ $bat -le 10 ]]; then
|
||||
icon=""
|
||||
|
||||
@@ -1,2 +1,7 @@
|
||||
bat=$(cat /sys/class/power_supply/BAT0/capacity)
|
||||
|
||||
if [ ! -d "/sys/class/power_supply/BAT0" ]; then
|
||||
bat="100"
|
||||
fi
|
||||
|
||||
echo "$bat"
|
||||
|
||||
Reference in New Issue
Block a user