mirror of
https://github.com/rad4day/Waybar.git
synced 2023-12-21 10:22:59 +01:00
feat(percent): adds a percent class to numeric modules
This commit is contained in:
@ -51,6 +51,8 @@ class Backlight : public ALabel {
|
||||
const std::string preferred_device_;
|
||||
static constexpr int EPOLL_MAX_EVENTS = 16;
|
||||
|
||||
std::string old_percent_;
|
||||
|
||||
std::optional<BacklightDev> previous_best_;
|
||||
std::string previous_format_;
|
||||
|
||||
|
@ -43,6 +43,7 @@ class Battery : public ALabel {
|
||||
int fd_;
|
||||
std::vector<int> wds_;
|
||||
std::string old_status_;
|
||||
std::string old_capacity_;
|
||||
};
|
||||
|
||||
} // namespace waybar::modules
|
||||
|
@ -23,6 +23,8 @@ class Cpu : public ALabel {
|
||||
std::tuple<uint16_t, std::string> getCpuUsage();
|
||||
std::vector<std::tuple<size_t, size_t>> parseCpuinfo();
|
||||
|
||||
std::string old_usage_;
|
||||
|
||||
std::vector<std::tuple<size_t, size_t>> prev_times_;
|
||||
waybar::util::SleeperThread thread_;
|
||||
};
|
||||
|
Reference in New Issue
Block a user