MCPcopy Create free account
hub / github.com/Alexays/Waybar / Workspaces

Method Workspaces

src/modules/hyprland/workspaces.cpp:17–34  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

15namespace waybar::modules::hyprland {
16
17Workspaces::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
36Workspaces::~Workspaces() {
37 m_ipc.unregisterForIPC(this);

Callers

nothing calls this directly

Calls 2

parseConfigFunction · 0.85
emptyMethod · 0.80

Tested by

no test coverage detected