Added changes made to the cpu module

This commit is contained in:
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 {
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();

View File

@ -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();

View File

@ -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();

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;
return {load1, load5, load15};
}
throw std::runtime_error("Can't get Load");
throw std::runtime_error("Can't get system load");
}