Added changes made to the cpu module

pull/2114/head
Mann mit Hut 2023-07-29 14:52:59 +02:00
parent 982ffde002
commit dce6a98f38
No known key found for this signature in database
GPG Key ID: 02D4D60B8250CB8C
4 changed files with 7 additions and 7 deletions

View File

@ -17,8 +17,8 @@ namespace waybar::modules {
class CpuFrequency : public ALabel { class CpuFrequency : public ALabel {
public: public:
CpuFrequency(const std::string&, const Json::Value&); CpuFrequency(const std::string&, const Json::Value&);
~CpuFrequency() = default; virtual ~CpuFrequency() = default;
auto update() -> void; auto update() -> void override;
private: private:
std::tuple<float, float, float> getCpuFrequency(); std::tuple<float, float, float> getCpuFrequency();

View File

@ -17,8 +17,8 @@ namespace waybar::modules {
class CpuUsage : public ALabel { class CpuUsage : public ALabel {
public: public:
CpuUsage(const std::string&, const Json::Value&); CpuUsage(const std::string&, const Json::Value&);
~CpuUsage() = default; virtual ~CpuUsage() = default;
auto update() -> void; auto update() -> void override;
private: private:
std::tuple<std::vector<uint16_t>, std::string> getCpuUsage(); std::tuple<std::vector<uint16_t>, std::string> getCpuUsage();

View File

@ -17,8 +17,8 @@ namespace waybar::modules {
class Load : public ALabel { class Load : public ALabel {
public: public:
Load(const std::string&, const Json::Value&); Load(const std::string&, const Json::Value&);
~Load() = default; virtual ~Load() = default;
auto update() -> void; auto update() -> void override;
private: private:
std::tuple<double, double, double> getLoad(); std::tuple<double, double, double> getLoad();

View File

@ -57,5 +57,5 @@ std::tuple<double, double, double> waybar::modules::Load::getLoad() {
double load15 = std::ceil(load[2] * 100.0) / 100.0; double load15 = std::ceil(load[2] * 100.0) / 100.0;
return {load1, load5, load15}; return {load1, load5, load15};
} }
throw std::runtime_error("Can't get Load"); throw std::runtime_error("Can't get system load");
} }