mirror of
https://github.com/rad4day/Waybar.git
synced 2023-12-21 10:22:59 +01:00
fix(cpu): show correct load
feat(cpu): show cores in tooltip
This commit is contained in:
@ -1,7 +1,9 @@
|
||||
#pragma once
|
||||
|
||||
#include <fmt/format.h>
|
||||
#include <sys/sysinfo.h>
|
||||
#include <fstream>
|
||||
#include <vector>
|
||||
#include <numeric>
|
||||
#include "util/chrono.hpp"
|
||||
#include "ALabel.hpp"
|
||||
|
||||
@ -12,6 +14,9 @@ class Cpu : public ALabel {
|
||||
Cpu(const Json::Value&);
|
||||
auto update() -> void;
|
||||
private:
|
||||
static inline const std::string data_dir_ = "/proc/stat";
|
||||
std::vector< std::tuple<size_t, size_t> > parseCpuinfo();
|
||||
std::vector< std::tuple<size_t, size_t> > prevTimes_;
|
||||
waybar::util::SleeperThread thread_;
|
||||
};
|
||||
|
||||
|
Reference in New Issue
Block a user