diff options
Diffstat (limited to 'battery')
| -rwxr-xr-x | battery | 12 |
1 files changed, 5 insertions, 7 deletions
@@ -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 + |
