feat(percent): adds a percent class to numeric modules

This commit is contained in:
Dan
2019-05-01 22:28:48 -04:00
committed by Dan
parent 1a024db03c
commit 472363a623
6 changed files with 19 additions and 0 deletions

View File

@ -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_;

View File

@ -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

View File

@ -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_;
};