Add support for multiple icon themes in the config

If there are multiple icon themes defined in the config option
'icon-theme' the module will try from left to right to find an icon.
The system default will always be added to this list.
This commit is contained in:
Till Smejkal
2020-07-05 13:07:12 +02:00
parent b7e8275d90
commit 06ad35c42b
3 changed files with 36 additions and 15 deletions

View File

@ -131,7 +131,7 @@ class Taskbar : public waybar::AModule
Gtk::Box box_;
std::vector<TaskPtr> tasks_;
Glib::RefPtr<Gtk::IconTheme> icon_theme_;
std::vector<Glib::RefPtr<Gtk::IconTheme>> icon_themes_;
struct zwlr_foreign_toplevel_manager_v1 *manager_;
struct wl_seat *seat_;
@ -154,7 +154,7 @@ class Taskbar : public waybar::AModule
bool show_output(struct wl_output *) const;
bool all_outputs() const;
Glib::RefPtr<Gtk::IconTheme> icon_theme() const;
std::vector<Glib::RefPtr<Gtk::IconTheme>> icon_themes() const;
};
} /* namespace waybar::modules::wlr */