diff --git a/include/modules/hyprland/workspaces.hpp b/include/modules/hyprland/workspaces.hpp index 5033b8df..500bbe36 100644 --- a/include/modules/hyprland/workspaces.hpp +++ b/include/modules/hyprland/workspaces.hpp @@ -1,5 +1,6 @@ #include #include + #include #include "AModule.hpp" diff --git a/src/modules/hyprland/workspaces.cpp b/src/modules/hyprland/workspaces.cpp index 23a323ad..f5cc8329 100644 --- a/src/modules/hyprland/workspaces.cpp +++ b/src/modules/hyprland/workspaces.cpp @@ -100,17 +100,16 @@ void Workspaces::create_workspace(int id) { } void Workspaces::remove_workspace(int id) { - auto workspace = std::find_if( - workspaces_.begin(), workspaces_.end(), - [&](std::unique_ptr &x) { return x->id() == id; }); + auto workspace = std::find_if(workspaces_.begin(), workspaces_.end(), + [&](std::unique_ptr &x) { return x->id() == id; }); - if (workspace == workspaces_.end()) { - spdlog::warn("Can't find workspace with id {}", workspace->get()->id()); - return; - } + if (workspace == workspaces_.end()) { + spdlog::warn("Can't find workspace with id {}", workspace->get()->id()); + return; + } - box_.remove(workspace->get()->button()); - workspaces_.erase(workspace); + box_.remove(workspace->get()->button()); + workspaces_.erase(workspace); } void Workspaces::init() {