waybar/include/modules/memory.hpp
Viktar Lukashonak 61a6c00c02
Happy clang
2023-03-02 16:57:32 +03:00

28 lines
488 B
C++

#pragma once
#include <fmt/format.h>
#include <fstream>
#include <unordered_map>
#include "ALabel.hpp"
#include "util/sleeper_thread.hpp"
namespace waybar::modules {
class Memory : public ALabel {
public:
Memory(const std::string&, const Json::Value&);
virtual ~Memory() = default;
auto update() -> void override;
private:
void parseMeminfo();
std::unordered_map<std::string, unsigned long> meminfo_;
util::SleeperThread thread_;
};
} // namespace waybar::modules