#!/usr/bin/env dash # shellcheck source=/dev/null SHELL_LIBRARY_VERSION="2.1.1" . %SHELL_LIBRARY_PATH capacity="$(cat /sys/class/power_supply/BAT0/capacity)" status="$(cat /sys/class/power_supply/BAT0/status)" printf "%s%% (%s)\n" "$capacity" "$status" # vim: ft=sh