refactor: Move module type string into modules

This allows us to identify module by their type and it is also better to
store the module type as part of the module instead of having it
hardcoded in factory.hpp
This commit is contained in:
patrick96 2020-05-15 19:59:08 +02:00 committed by Patrick Ziegler
parent 06012af3aa
commit d592eea966
30 changed files with 137 additions and 89 deletions
include/modules

View file

@ -22,6 +22,8 @@ namespace modules {
bool build(builder* builder, const string& tag) const;
void update() {}
static constexpr auto TYPE = "custom/menu";
protected:
bool input(string&& cmd);
@ -42,6 +44,6 @@ namespace modules {
std::atomic<int> m_level{-1};
};
}
} // namespace modules
POLYBAR_NS_END