fix code style

This commit is contained in:
2025-12-10 17:58:01 +01:00
parent 4d61a80a7c
commit 0b3a6c4696
19 changed files with 1016 additions and 1366 deletions

View File

@@ -8,7 +8,7 @@ App::App() {
this->setupServices();
this->app = Gtk::Application::create("org.example.mybar");
app->signal_activate().connect([&]() {
auto display = Gdk::Display::get_default();
auto monitors = display->get_monitors();
@@ -17,16 +17,19 @@ App::App() {
auto monitor = std::dynamic_pointer_cast<Gdk::Monitor>(
monitors->get_object(i));
if (monitor) {
HyprlandService::Monitor* hyprlandMonitor = nullptr;
HyprlandService::Monitor *hyprlandMonitor = nullptr;
try {
hyprlandMonitor = this->hyprlandService.getMonitorByIndex(i);
hyprlandMonitor =
this->hyprlandService.getMonitorByIndex(i);
} catch (const std::exception &ex) {
std::cerr << "[App] Failed to fetch Hyprland monitor: " << ex.what() << std::endl;
std::cerr << "[App] Failed to fetch Hyprland monitor: "
<< ex.what() << std::endl;
continue;
}
auto bar = new Bar(monitor->gobj(), this->hyprlandService, this->trayService, hyprlandMonitor->id);
auto bar = new Bar(monitor->gobj(), this->hyprlandService,
this->trayService, hyprlandMonitor->id);
bar->set_application(app);
bar->show();
@@ -53,6 +56,4 @@ void App::setupServices() {
this->trayService.start();
}
int App::run() {
return this->app->run();
}
int App::run() { return this->app->run(); }