This commit is contained in:
Your Name 2024-01-05 23:15:58 +03:00
parent c30ef2f523
commit 363cd4c1d1
6 changed files with 1 additions and 31 deletions

View File

@ -19,10 +19,6 @@ typedef struct {
/* Example: /sys/class/power_supply/battery/capacity */ /* Example: /sys/class/power_supply/battery/capacity */
#define BATT_NAME NULL #define BATT_NAME NULL
/* #define PRINT_TOTAL_MEM */
/* #define PRINT_USER_MEM */
#define PRINT_USED_AND_TOTAL_MEM
#ifdef _MAIN_H #ifdef _MAIN_H
PARAMETR CONFIG[] = { PARAMETR CONFIG[] = {
{" os ", PrintOs}, {" os ", PrintOs},

View File

@ -191,18 +191,8 @@ int GetMem(const char *title, const FETCH fetch) {
return 1; return 1;
fclose(fp); fclose(fp);
off_t used = (total - (cached + free + buffer)) / 1024;
#ifdef PRINT_USED_AND_TOTAL_MEM
printf("%s%s%s%lumb / %lumb", fetch.color, title, fetch.font_color, (uintmax_t)used, (uintmax_t)total / 1024);
#elif PRINT_TOTALMEM
printf("%s%s%s%lumb", fetch.color, title, fetch.font_color, (uintmax_t)total / 1024);
#else
printf("%s%s%s%lumb", fetch.color, title, fetch.font_color, (uintmax_t)used);
#endif
printf("%s%s%s%lumb / %lumb", fetch.color, title, fetch.font_color, (uintmax_t)(total - (cached + free + buffer)) / 1024, (uintmax_t)total / 1024);
return 0; return 0;
} }

View File

@ -19,10 +19,6 @@ typedef struct {
/* Example: /sys/class/power_supply/battery/capacity */ /* Example: /sys/class/power_supply/battery/capacity */
#define BATT_NAME NULL #define BATT_NAME NULL
/* #define PRINT_TOTAL_MEM */
/* #define PRINT_USER_MEM */
#define PRINT_USED_AND_TOTAL_MEM
#ifdef _MAIN_H #ifdef _MAIN_H
PARAMETR CONFIG[] = { PARAMETR CONFIG[] = {
{" os ", PrintOs}, {" os ", PrintOs},

View File

@ -19,10 +19,6 @@ typedef struct {
/* Example: /sys/class/power_supply/battery/capacity */ /* Example: /sys/class/power_supply/battery/capacity */
#define BATT_NAME NULL #define BATT_NAME NULL
/* #define PRINT_TOTAL_MEM */
/* #define PRINT_USER_MEM */
#define PRINT_USED_AND_TOTAL_MEM
#ifdef _MAIN_H #ifdef _MAIN_H
PARAMETR CONFIG[] = { PARAMETR CONFIG[] = {
{" ", Blank}, {" ", Blank},

View File

@ -19,10 +19,6 @@ typedef struct {
/* Example: /sys/class/power_supply/battery/capacity */ /* Example: /sys/class/power_supply/battery/capacity */
#define BATT_NAME NULL #define BATT_NAME NULL
/* #define PRINT_TOTAL_MEM */
/* #define PRINT_USER_MEM */
#define PRINT_USED_AND_TOTAL_MEM
#ifdef _MAIN_H #ifdef _MAIN_H
PARAMETR CONFIG[] = { PARAMETR CONFIG[] = {
{" ", Blank}, {" ", Blank},

View File

@ -19,10 +19,6 @@ typedef struct {
/* Example: /sys/class/power_supply/battery/capacity */ /* Example: /sys/class/power_supply/battery/capacity */
#define BATT_NAME NULL #define BATT_NAME NULL
/* #define PRINT_TOTAL_MEM */
/* #define PRINT_USER_MEM */
#define PRINT_USED_AND_TOTAL_MEM
#ifdef _MAIN_H #ifdef _MAIN_H
PARAMETR CONFIG[] = { PARAMETR CONFIG[] = {
{" pc: ", Blank}, {" pc: ", Blank},