From fbc65d3c648c4d7fd5891724f07bf8f4b0094fd6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Miskolczi=20Rich=C3=A1rd?= Date: Tue, 10 Jun 2025 16:47:06 +0200 Subject: [PATCH] Wrote main code flow --- src/main.cpp | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/src/main.cpp b/src/main.cpp index 8659566..1c2473a 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -1,15 +1,15 @@ #include "../include/HyprlandService.h" int main(int, char**){ - for (auto& c : HyprlandService::getClientsOnActiveWorkspace()) { - HyprlandService::setClientFloating(c); + if (HyprlandService::isFloatingRulePresent()) { + for (auto& c : HyprlandService::getClientsOnActiveWorkspace()) { + HyprlandService::setClientTiled(c); + } + HyprlandService::setFloatingRule(false); + } else { + for (auto& c : HyprlandService::getClientsOnActiveWorkspace()) { + HyprlandService::setClientFloating(c); + } + HyprlandService::setFloatingRule(true); } - HyprlandService::setFloatingRule(true); - - sleep(5); - - for (auto& c : HyprlandService::getClientsOnActiveWorkspace()) { - HyprlandService::setClientTiled(c); - } - HyprlandService::setFloatingRule(false); } \ No newline at end of file