Merge pull request #2935 from Alexays/revert-2915-cpu_style

Revert "Add style class for CPU state"
This commit is contained in:
Alexis Rouillard 2024-02-19 23:10:20 +01:00 committed by GitHub
commit d36f15c26b
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
3 changed files with 0 additions and 9 deletions

View File

@ -22,7 +22,6 @@ class Cpu : public ALabel {
private: private:
std::vector<std::tuple<size_t, size_t>> prev_times_; std::vector<std::tuple<size_t, size_t>> prev_times_;
std::string prev_state_;
util::SleeperThread thread_; util::SleeperThread thread_;
}; };

View File

@ -121,5 +121,3 @@ CPU usage per core rendered as icons:
# STYLE # STYLE
- *#cpu* - *#cpu*
- *#cpu.<state>*
- *<state>* can be defined in the *config*. For more information see *states*.

View File

@ -36,12 +36,6 @@ auto waybar::modules::Cpu::update() -> void {
format = config_["format-" + state].asString(); format = config_["format-" + state].asString();
} }
if (!prev_state_.empty()) {
label_.get_style_context()->remove_class(prev_state_);
}
label_.get_style_context()->add_class(state);
prev_state_ = state;
if (format.empty()) { if (format.empty()) {
event_box_.hide(); event_box_.hide();
} else { } else {