fix(hyprland): use workspace `name` as default icon

Wlr and Sway modules use the workspace `name` as the default icon if no icon is provided. This adds the same behavior for the `hyprland/workspace` module.

Closes https://github.com/Alexays/Waybar/issues/2533
This commit is contained in:
woojiq 2023-09-23 21:55:18 +03:00
parent 6997b34a81
commit d37954322a
1 changed files with 2 additions and 1 deletions

View File

@ -549,7 +549,8 @@ std::string &Workspace::select_icon(std::map<std::string, std::string> &icons_ma
if (default_icon_it != icons_map.end()) { if (default_icon_it != icons_map.end()) {
return default_icon_it->second; return default_icon_it->second;
} }
return icons_map[""];
return name_;
} }
auto Workspace::handle_clicked(GdkEventButton *bt) -> bool { auto Workspace::handle_clicked(GdkEventButton *bt) -> bool {