Waybar/include/modules/load.hpp

30 lines
498 B
C++
Raw Normal View History

#pragma once
#include <fmt/format.h>
#include <cstdint>
#include <fstream>
#include <numeric>
#include <string>
#include <utility>
#include <vector>
2023-04-13 23:25:13 +00:00
#include "ALabel.hpp"
#include "util/sleeper_thread.hpp"
namespace waybar::modules {
2023-04-13 23:25:13 +00:00
class Load : public ALabel {
public:
Load(const std::string&, const Json::Value&);
~Load() = default;
auto update() -> void;
private:
std::tuple<double, double, double> getLoad();
util::SleeperThread thread_;
};
} // namespace waybar::modules