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:
parent
06012af3aa
commit
d592eea966
30 changed files with 137 additions and 89 deletions
include/modules
|
@ -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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue