From 191f3f676cabd039a6bb68a8c93591c28dfd785c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andr=C3=A9=20Silva?= Date: Fri, 22 Sep 2023 10:51:45 +0100 Subject: [PATCH] autotile: rename autotiling functions --- src/Hy3Layout.cpp | 8 ++++---- src/Hy3Layout.hpp | 4 ++-- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/src/Hy3Layout.cpp b/src/Hy3Layout.cpp index 7d4d26b..b70416b 100644 --- a/src/Hy3Layout.cpp +++ b/src/Hy3Layout.cpp @@ -167,12 +167,12 @@ void Hy3Layout::onWindowCreatedTiling(CWindow* window) { static const auto* at_trigger_height = &HyprlandAPI::getConfigValue(PHANDLE, "plugin:hy3:autotile:trigger_height")->intValue; // clang-format on - this->updateAtWorkspaces(); + this->updateAutotileWorkspaces(); auto& target_group = opening_into->data.as_group; if (*at_enable && opening_after != nullptr && target_group.children.size() > 1 && target_group.layout != Hy3GroupLayout::Tabbed - && this->shouldAtWorkspace(opening_into->workspace_id)) + && this->shouldAutotileWorkspace(opening_into->workspace_id)) { auto is_horizontal = target_group.layout == Hy3GroupLayout::SplitH; auto trigger = is_horizontal ? *at_trigger_width : *at_trigger_height; @@ -1716,7 +1716,7 @@ Hy3Node* Hy3Layout::shiftOrGetFocus( return nullptr; } -void Hy3Layout::updateAtWorkspaces() { +void Hy3Layout::updateAutotileWorkspaces() { static const auto* at_raw_workspaces = &HyprlandAPI::getConfigValue(PHANDLE, "plugin:hy3:autotile:workspaces")->strValue; @@ -1756,7 +1756,7 @@ void Hy3Layout::updateAtWorkspaces() { } } -bool Hy3Layout::shouldAtWorkspace(int workspace_id) { +bool Hy3Layout::shouldAutotileWorkspace(int workspace_id) { if (this->at_workspaces_blacklist) { return !this->at_workspaces.contains(workspace_id); } else { diff --git a/src/Hy3Layout.hpp b/src/Hy3Layout.hpp index a171c7e..eacb275 100644 --- a/src/Hy3Layout.hpp +++ b/src/Hy3Layout.hpp @@ -139,8 +139,8 @@ private: // nullptr. if once is true, only one group will be broken out of / into Hy3Node* shiftOrGetFocus(Hy3Node&, ShiftDirection, bool shift, bool once, bool visible); - void updateAtWorkspaces(); - bool shouldAtWorkspace(int); + void updateAutotileWorkspaces(); + bool shouldAutotileWorkspace(int); std::string at_raw_workspaces; bool at_workspaces_blacklist;