summaryrefslogtreecommitdiff
path: root/battery
diff options
context:
space:
mode:
authortslil clingman <>2021-01-20 15:40:09 -0500
committertslil clingman <>2021-01-20 15:40:09 -0500
commitc0ffa4c32b140378fb51e4c4f8c8c75a67a9d572 (patch)
tree605d07e830d47db96930a0aeb9b12f455f6135e8 /battery
parent8109b6a56b74ff1c5780c14415caf23ecaeb0623 (diff)
Small changes
Diffstat (limited to 'battery')
-rwxr-xr-xbattery12
1 files changed, 5 insertions, 7 deletions
diff --git a/battery b/battery
index 29189ae..1e7a7da 100755
--- a/battery
+++ b/battery
@@ -1,9 +1,7 @@
#!/bin/sh
report=$(acpi | tr -d ',')
-echo $report | grep -qv Unknown
-if [ "$?" = "0" ]; then
- status=$(echo $report | cut -d\ -f 3 | cut -b 1)
- perc=$(echo $report | cut -d\ -f 4)
- time=$(echo $report | cut -d\ -f 5 | sed 's/\([0-9]*\):\([0-9]*\).*/\1h\2m/')
- echo $status$perc $time
-fi
+status=$(echo $report | cut -d\ -f 3 | cut -b 1)
+perc=$(echo $report | cut -d\ -f 4)
+time=$(echo $report | cut -d\ -f 5 | sed 's/\([0-9]*\):\([0-9]*\).*/\1h\2m/')
+echo $status$perc $time
+