summaryrefslogtreecommitdiff
path: root/battery
blob: 1e7a7daa60dcadabcfcce808b1b3da2ed0f967ef (plain)
1
2
3
4
5
6
7
#!/bin/sh
report=$(acpi | tr -d ',')
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