fix code style
This commit is contained in:
17
src/app.cpp
17
src/app.cpp
@@ -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(); }
|
||||
|
||||
Reference in New Issue
Block a user