refactor and shizz
This commit is contained in:
15
src/app.cpp
15
src/app.cpp
@@ -22,7 +22,7 @@ App::App() {
|
||||
|
||||
try {
|
||||
hyprlandMonitor =
|
||||
this->hyprlandService.getMonitorByIndex(i);
|
||||
this->hyprlandService->getMonitorByIndex(i);
|
||||
} catch (const std::exception &ex) {
|
||||
std::cerr << "[App] Failed to fetch Hyprland monitor: "
|
||||
<< ex.what() << std::endl;
|
||||
@@ -31,8 +31,7 @@ App::App() {
|
||||
|
||||
|
||||
|
||||
auto bar = new Bar(monitor->gobj(), this->hyprlandService,
|
||||
this->trayService, hyprlandMonitor->id);
|
||||
auto bar = new Bar(monitor->gobj(), hyprlandMonitor->id);
|
||||
|
||||
bar->set_application(app);
|
||||
bar->show();
|
||||
@@ -47,16 +46,16 @@ App::App() {
|
||||
}
|
||||
bars.clear();
|
||||
|
||||
this->trayService.stop();
|
||||
this->trayService->stop();
|
||||
});
|
||||
}
|
||||
|
||||
void App::setupServices() {
|
||||
this->hyprlandService.socketEventSignal.connect(sigc::mem_fun(
|
||||
this->hyprlandService, &HyprlandService::on_hyprland_event));
|
||||
this->hyprlandService->socketEventSignal.connect(sigc::mem_fun(
|
||||
*this->hyprlandService, &HyprlandService::on_hyprland_event));
|
||||
|
||||
this->hyprlandService.start();
|
||||
this->trayService.start();
|
||||
this->hyprlandService->start();
|
||||
this->trayService->start();
|
||||
}
|
||||
|
||||
int App::run() { return this->app->run(); }
|
||||
|
||||
Reference in New Issue
Block a user