fixed
This commit is contained in:
parent
c30ef2f523
commit
363cd4c1d1
4
config.h
4
config.h
@ -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},
|
||||||
|
12
src/fetch.c
12
src/fetch.c
@ -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;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -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},
|
||||||
|
@ -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},
|
||||||
|
@ -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},
|
||||||
|
@ -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},
|
||||||
|
Loading…
Reference in New Issue
Block a user