From 9669d6e759ea5823db3182d264d47be9858f761c Mon Sep 17 00:00:00 2001 From: Mikael Hansson Date: Thu, 31 Aug 2023 20:43:34 +0200 Subject: [PATCH] Added charge status when fully charged in FreeBSD --- status.sh | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/status.sh b/status.sh index 7e97aec..6be0ded 100755 --- a/status.sh +++ b/status.sh @@ -7,10 +7,12 @@ if [ "$os" = "FreeBSD" ]; then clock=`date +'%Y-%m-%d %H:%M'` fi -if [ "$chargestate" = -1 ]; then - chargestatus=charging +if [ "$chargestate" = 2 ]; then + chargestatus="charging" + elif [ "$chargestate" = 0 ]; then + chargestatus="full/not charging" else - chargestatus=discharging + chargestatus="discharging" fi echo "$chargestatus" - "$batterypercent"% - "$clock"