This commit is contained in:
Your Name 2024-01-03 18:46:17 +03:00
parent f9ccaaa80b
commit 0bb1464704
3 changed files with 4 additions and 3 deletions

View File

@ -1,6 +1,6 @@
#!/bin/sh
CC=cc
FLAGS="-Os -s"
FLAGS="-Os -s -pedantic -Wall -Wextra"
$CC -Iinclude -I. src/main.c -c -o main.o &&
$CC -Iinclude -I. src/fetch.c -c -o fetch.o &&

BIN
kfetch Executable file

Binary file not shown.

View File

@ -190,6 +190,7 @@ int GetMem(const char *title, const FETCH fetch) {
if (fscanf(fp, "MemTotal: %lu kB\nMemFree: %lu kB", &total, &free) < 0)
return 1;
fclose(fp);
#ifdef PRINT_USED_AND_TOTAL_MEM
printf("%s%s%s%lumb / %lumb", fetch.color, title, fetch.font_color, (uintmax_t)(total - free) / 1024, (uintmax_t)total / 1024);
@ -201,7 +202,6 @@ int GetMem(const char *title, const FETCH fetch) {
#endif
fclose(fp);
return 0;
}
@ -305,8 +305,9 @@ int GetBattery(const char *title, const FETCH fetch) {
if (fscanf(fp, "%d", &capacity) < 0)
return 1;
fclose(fp);
printf("%s%s%s", fetch.color, title, fetch.font_color);
DrawBar(capacity, 100);
return 0;
}