From f1bfb14668ffd601940459805be734df1aa3645c Mon Sep 17 00:00:00 2001 From: Sebastian Moser Date: Wed, 22 May 2024 23:31:25 +0200 Subject: [PATCH] on the new laptop the charger is BAT1 for some reason --- mybin/ru | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/mybin/ru b/mybin/ru index c42d97f..f3498ed 100755 --- a/mybin/ru +++ b/mybin/ru @@ -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" ] then -now=$(cat /sys/class/power_supply/BAT0/charge_now) -full=$(cat /sys/class/power_supply/BAT0/charge_full) +now=$(cat /sys/class/power_supply/BAT1/charge_now) +full=$(cat /sys/class/power_supply/BAT1/charge_full) stat=$(python -c "print( round($now / float($full) *100) )") echo BAT0 at: ${stat}% @@ -94,7 +94,7 @@ echo BAT0 at: ${stat}% elif [ "$1" == "bstat" ] then -cat /sys/class/power_supply/BAT0/status +cat /sys/class/power_supply/BAT1/status elif [ "$1" == "hibernate" ]