fixed
This commit is contained in:
parent
743123f9c5
commit
76e0dcb8ed
29
config.h
29
config.h
@ -9,30 +9,21 @@ typedef struct {
|
||||
} PARAMETR;
|
||||
|
||||
/* Config, EDIT THERE */
|
||||
#define COLORS "\033[31m<> \033[32m<> \033[33m<> \033[34m<> \033[35m<> \033[36m<>\033[0m"
|
||||
#define FONT_COLOR "\033[1;37m"
|
||||
#define BAR_WIDTH 10
|
||||
/* Uncomment if you use firacode font */
|
||||
/* #define FIRA_CODE */
|
||||
#define COLORS " \033[31m(>_<) \033[32m(OwO) \033[33m($w$) \033[34m(;~;)\033[0m"
|
||||
#define FONT_COLOR "\033[0m"
|
||||
|
||||
/* Full path to capacity file */
|
||||
/* Example: /sys/class/power_supply/battery/capacity */
|
||||
#define BAR_WIDTH 1
|
||||
#define BATT_NAME NULL
|
||||
|
||||
#ifdef _MAIN_H
|
||||
PARAMETR CONFIG[] = {
|
||||
{" os ", PrintOs},
|
||||
{" kr ", GetKernel},
|
||||
{" usr ", GetUser},
|
||||
{" upt ", GetUptime},
|
||||
{" arch ", GetArch},
|
||||
{"shell ", GetShell},
|
||||
{" pkgs ", GetPkg},
|
||||
{" mem ", GetMem},
|
||||
{"model ", GetModel},
|
||||
{" host ", GetHostname},
|
||||
{" lAVG ", GetAVG},
|
||||
{" batt ", GetBattery},
|
||||
{" -> ", PrintOs},
|
||||
{" ", Blank},
|
||||
{" <- ", GetUptime},
|
||||
{" ", Blank},
|
||||
{" -> ", GetMem},
|
||||
{" ", Blank},
|
||||
{" <- ", GetArch},
|
||||
{" ", Blank},
|
||||
{COLORS, Blank}
|
||||
};
|
||||
|
@ -190,7 +190,7 @@ int GetMem(const char *title, const FETCH fetch) {
|
||||
return 1;
|
||||
|
||||
off_t free = 0, total = 0, cached = 0, buffer = 0, unused = 0;
|
||||
if (fscanf(fp, "MemTotal: %lu kB\nMemFree: %lu kB\nMemAvailable: %lu kB\nBuffers: %lu kB\nCached: %lu kB", &total, &free, &unused, &buffer, &cached) < 0)
|
||||
if (fscanf(fp, "MemTotal: %ju kB\nMemFree: %ju kB\nMemAvailable: %ju kB\nBuffers: %ju kB\nCached: %ju kB", &total, &free, &unused, &buffer, &cached) < 0)
|
||||
return 1;
|
||||
|
||||
fclose(fp);
|
||||
|
@ -22,7 +22,7 @@ int main(int argc, char **argv) {
|
||||
|
||||
case 'h':
|
||||
default:
|
||||
printf("kfetch [hl]\n\t[-h Help menu] [-l Dont print logo]\n\t[-d N Set N as distro name]\n");
|
||||
printf("kfetch [-hld]\n\t-h Help menu\n\t-l Doesnt print logo\n\t-d N Set N as distro name\n");
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
@ -57,6 +57,7 @@ int main(int argc, char **argv) {
|
||||
}
|
||||
|
||||
for (; j < fetch.logo_size; j++)
|
||||
if (!l_flag)
|
||||
printf("%s\n", fetch.logo[j]);
|
||||
|
||||
printf("\033[0m");
|
||||
|
Loading…
Reference in New Issue
Block a user