no compile errors, fully functional workspace indicators

This commit is contained in:
2026-01-31 20:00:35 +01:00
parent 7ad6f46b3c
commit f3b250759e
17 changed files with 400 additions and 809 deletions

View File

@@ -6,9 +6,7 @@
App::App() {
this->app = Gtk::Application::create("org.example.mybar");
this->setupServices();
this->notificationService.intialize();
this->hyprlandService = HyprlandService::getInstance();
app->signal_activate().connect([&]() {
@@ -21,11 +19,15 @@ App::App() {
);
if (monitor) {
auto bar = new Bar(monitor->gobj());
auto bar = std::make_shared<Bar>(monitor->gobj());
bar->set_application(app);
bar->show();
bar->addLeftWidget(hyprlandService->getWorkspaceIndicatorsForMonitor(i));
std::string monitorName = monitor->get_connector();
bar->addLeftWidget(hyprlandService->getWorkspaceIndicatorsForMonitor(monitorName));
hyprlandService->addBar(bar, monitorName);
bars.push_back(bar);
}
}
@@ -33,16 +35,12 @@ App::App() {
app->signal_shutdown().connect([&]() {
for (auto bar : bars) {
delete bar;
}
bars.clear();
this->trayService->stop();
});
}
void App::setupServices() {
this->trayService->start();
}