Network detect (#26)

This commit is contained in:
Alex
2018-08-17 14:24:00 +02:00
committed by GitHub
parent 0603b99714
commit d280f5e8bd
8 changed files with 274 additions and 20 deletions

View File

@ -13,7 +13,7 @@ waybar::modules::Memory::Memory(Json::Value config)
auto waybar::modules::Memory::update() -> void
{
struct sysinfo info = {};
struct sysinfo info = {0};
if (sysinfo(&info) == 0) {
auto total = info.totalram * info.mem_unit;
auto freeram = info.freeram * info.mem_unit;