#pragma once #include "modules/meta/timer_module.hpp" #include "settings.hpp" POLYBAR_NS namespace modules { struct cpu_time { unsigned long long user; unsigned long long nice; unsigned long long system; unsigned long long idle; unsigned long long steal; unsigned long long total; }; using cpu_time_t = unique_ptr; class cpu_module : public timer_module { public: explicit cpu_module(const bar_settings&, string); bool update(); bool build(builder* builder, const string& tag) const; static constexpr auto TYPE = "internal/cpu"; protected: bool read_values(); float get_load(size_t core) const; private: static constexpr auto TAG_LABEL = "