mirror of
https://github.com/rad4day/Waybar.git
synced 2025-07-13 22:52:30 +02:00
refactor: enum utility allow overriding
This commit is contained in:
@ -87,8 +87,14 @@ class Workspaces : public AModule, public EventHandler {
|
||||
bool all_outputs_ = false;
|
||||
bool show_special_ = false;
|
||||
bool active_only_ = false;
|
||||
util::EnumParser enum_parser_;
|
||||
util::EnumParser::SORT_METHOD sort_by_ = util::EnumParser::SORT_METHOD::DEFAULT;
|
||||
|
||||
enum SORT_METHOD { ID, NAME, NUMBER, DEFAULT };
|
||||
util::EnumParser<SORT_METHOD> enum_parser_;
|
||||
SORT_METHOD sort_by_ = SORT_METHOD::DEFAULT;
|
||||
std::map<std::string, SORT_METHOD> sort_map_ = {{"ID", SORT_METHOD::ID},
|
||||
{"NAME", SORT_METHOD::NAME},
|
||||
{"NUMBER", SORT_METHOD::NUMBER},
|
||||
{"DEFAULT", SORT_METHOD::DEFAULT}};
|
||||
|
||||
void fill_persistent_workspaces();
|
||||
void create_persistent_workspaces();
|
||||
|
Reference in New Issue
Block a user