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