Added changes made to the cpu module
parent
982ffde002
commit
dce6a98f38
|
@ -17,8 +17,8 @@ namespace waybar::modules {
|
|||
class CpuFrequency : public ALabel {
|
||||
public:
|
||||
CpuFrequency(const std::string&, const Json::Value&);
|
||||
~CpuFrequency() = default;
|
||||
auto update() -> void;
|
||||
virtual ~CpuFrequency() = default;
|
||||
auto update() -> void override;
|
||||
|
||||
private:
|
||||
std::tuple<float, float, float> getCpuFrequency();
|
||||
|
|
|
@ -17,8 +17,8 @@ namespace waybar::modules {
|
|||
class CpuUsage : public ALabel {
|
||||
public:
|
||||
CpuUsage(const std::string&, const Json::Value&);
|
||||
~CpuUsage() = default;
|
||||
auto update() -> void;
|
||||
virtual ~CpuUsage() = default;
|
||||
auto update() -> void override;
|
||||
|
||||
private:
|
||||
std::tuple<std::vector<uint16_t>, std::string> getCpuUsage();
|
||||
|
|
|
@ -17,8 +17,8 @@ namespace waybar::modules {
|
|||
class Load : public ALabel {
|
||||
public:
|
||||
Load(const std::string&, const Json::Value&);
|
||||
~Load() = default;
|
||||
auto update() -> void;
|
||||
virtual ~Load() = default;
|
||||
auto update() -> void override;
|
||||
|
||||
private:
|
||||
std::tuple<double, double, double> getLoad();
|
||||
|
|
|
@ -57,5 +57,5 @@ std::tuple<double, double, double> waybar::modules::Load::getLoad() {
|
|||
double load15 = std::ceil(load[2] * 100.0) / 100.0;
|
||||
return {load1, load5, load15};
|
||||
}
|
||||
throw std::runtime_error("Can't get Load");
|
||||
throw std::runtime_error("Can't get system load");
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue