| 15 | namespace waybar::modules::hyprland { |
| 16 | |
| 17 | Workspaces::Workspaces(const std::string& id, const Bar& bar, const Json::Value& config) |
| 18 | : AModule(config, "workspaces", id, false, false), |
| 19 | m_bar(bar), |
| 20 | m_box(bar.orientation, 0), |
| 21 | m_ipc(IPC::inst()) { |
| 22 | parseConfig(config); |
| 23 | |
| 24 | m_box.set_name("workspaces"); |
| 25 | if (!id.empty()) { |
| 26 | m_box.get_style_context()->add_class(id); |
| 27 | } |
| 28 | m_box.get_style_context()->add_class(MODULE_CLASS); |
| 29 | event_box_.add(m_box); |
| 30 | |
| 31 | setCurrentMonitorId(); |
| 32 | init(); |
| 33 | registerIpc(); |
| 34 | } |
| 35 | |
| 36 | Workspaces::~Workspaces() { |
| 37 | m_ipc.unregisterForIPC(this); |
nothing calls this directly
no test coverage detected