Files
src/battery/battery.linux
T
2022-09-17 17:55:31 -04:00

7 lines
175 B
Bash
Executable File

#!/bin/sh
# this is a dirty hack.
# acpi | awk '{print $4}' will print the battery percentage,
# and s/,$// strips the trailing comma.
acpi | awk '{print $4}' | sed 's/,$//'