Add style classes for hyprland/submap
This commit is contained in:
parent
2c244b5e83
commit
77c7b91b40
|
@ -80,3 +80,4 @@ Addressed by *hyprland/submap*
|
|||
# STYLE
|
||||
|
||||
- *#submap*
|
||||
- *#submap.<name>*
|
||||
|
|
|
@ -54,8 +54,16 @@ void Submap::onEvent(const std::string& ev) {
|
|||
auto submapName = ev.substr(ev.find_last_of('>') + 1);
|
||||
submapName = waybar::util::sanitize_string(submapName);
|
||||
|
||||
if (!submap_.empty()){
|
||||
label_.get_style_context()->remove_class(submap_);
|
||||
}
|
||||
|
||||
submap_ = submapName;
|
||||
|
||||
label_.get_style_context()->add_class(submap_);
|
||||
|
||||
|
||||
|
||||
spdlog::debug("hyprland submap onevent with {}", submap_);
|
||||
|
||||
dp.emit();
|
||||
|
|
Loading…
Reference in New Issue