diff options
| author | tslil clingman <> | 2021-01-24 20:23:19 -0500 |
|---|---|---|
| committer | tslil clingman <> | 2021-01-24 20:23:19 -0500 |
| commit | 3c79bbc4529f62d462f6807f354b6b4c5e3477e6 (patch) | |
| tree | 3df4f41d1a19eb0e48e60d75f580ff1d8d47b093 /battery | |
| parent | 515c31a1f08d7ba500bf7261d7018a250dfd9779 (diff) | |
| parent | 92f24df41be941d407965368a9c84b7f061fddb8 (diff) | |
Merge branch 'master' of git.sr.ht:~tslil/scripts
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 + |
