X-Git-Url: https://git.xinqibao.xyz/slstatus.git/blobdiff_plain/2bd581a47b8e355a398b87bb82fdcff547b8073a..f9609f4ff421787bfa46b8f1c6ef2419b7679f7b:/components/battery.c?ds=sidebyside diff --git a/components/battery.c b/components/battery.c index e997e4c..a63b9d0 100644 --- a/components/battery.c +++ b/components/battery.c @@ -16,8 +16,7 @@ snprintf(path, sizeof(path), "%s%s%s", "/sys/class/power_supply/", bat, "/capacity"); - return (pscanf(path, "%i", &perc) == 1) ? - bprintf("%d", perc) : NULL; + return (pscanf(path, "%i", &perc) == 1) ? bprintf("%d", perc) : NULL; } const char * @@ -29,7 +28,6 @@ } map[] = { { "Charging", "+" }, { "Discharging", "-" }, - { "Full", "=" }, }; size_t i; char path[PATH_MAX], state[12];