Michael137 / slstatus

custom fork of slstatus
ISC License
0 stars 0 forks source link

Wrong RAM values shown when those are the only components in the conifguration #2

Open Michael137 opened 5 years ago

Michael137 commented 5 years ago

Hey I am still testing slstatus with FreeBSD there is issue with ram_used and ram_total functions.

Here is my config.h and what I get at statusbar.

config.h:

static const struct arg args[] = { / function format argument / { ram_total, " %s", NULL }, { ram_used, "/%s", NULL },

bar: 128.0 Ti/128.0 Ti

Expecting behavior: 2 GiB / 130MiB

FIX: User simply added a few more components (see next comment)

Michael137 commented 5 years ago

fixed config.h: static const struct arg args[] = { / function format argument / { cpu_perc, " CPU %%%s", NULL },

{ ram_total, " | RAM %s",        NULL },
{ ram_used, "/%s",        NULL },

{ disk_total, " | HDD %s",       "/" },
{ disk_used, "/%s",        "/" },

{ wifi_essid, " | %s",           "wlan0" },
{ wifi_perc,  " %%%s",          "wlan0" },
{ netspeed_rx, " DOWN %s", "wlan0" },
{ netspeed_tx, " UP %s", "wlan0" },

    { datetime,   " | %s",          "%F %T" },
{ vol_perc, " | VOL %%%s",        "/dev/mixer" },

};