on the new laptop the charger is BAT1 for some reason

This commit is contained in:
Sebastian Moser
2024-05-22 23:31:25 +02:00
parent 620ec1ceec
commit f1bfb14668

View File

@@ -85,8 +85,8 @@ sudo mount -t cifs //192.168.1.2/lan /home/me/lan -o x-gvfs-hide,username=guest,
elif [ "$1" == "bat" ] elif [ "$1" == "bat" ]
then then
now=$(cat /sys/class/power_supply/BAT0/charge_now) now=$(cat /sys/class/power_supply/BAT1/charge_now)
full=$(cat /sys/class/power_supply/BAT0/charge_full) full=$(cat /sys/class/power_supply/BAT1/charge_full)
stat=$(python -c "print( round($now / float($full) *100) )") stat=$(python -c "print( round($now / float($full) *100) )")
echo BAT0 at: ${stat}% echo BAT0 at: ${stat}%
@@ -94,7 +94,7 @@ echo BAT0 at: ${stat}%
elif [ "$1" == "bstat" ] elif [ "$1" == "bstat" ]
then then
cat /sys/class/power_supply/BAT0/status cat /sys/class/power_supply/BAT1/status
elif [ "$1" == "hibernate" ] elif [ "$1" == "hibernate" ]