191f3f676cabd039a6bb68a8c93591c28dfd785c

Author
André Silva <andrerfosilva@gmail.com>
Committer
André Silva <andrerfosilva@gmail.com>
Date

Message

autotile: rename autotiling functions

Diff

 1diff --git a/src/Hy3Layout.cpp b/src/Hy3Layout.cpp
 2index 7d4d26b15e435b4b3db251a7aece520cf204c50e..b70416b2c908767ede7ee6099ce89756f0a75932 100644
 3--- a/src/Hy3Layout.cpp
 4+++ b/src/Hy3Layout.cpp
 5@@ -167,12 +167,12 @@ void Hy3Layout::onWindowCreatedTiling(CWindow* window) {
 6 		static const auto* at_trigger_height = &HyprlandAPI::getConfigValue(PHANDLE, "plugin:hy3:autotile:trigger_height")->intValue;
 7 		// clang-format on
 8 
 9-		this->updateAtWorkspaces();
10+		this->updateAutotileWorkspaces();
11 
12 		auto& target_group = opening_into->data.as_group;
13 		if (*at_enable && opening_after != nullptr && target_group.children.size() > 1
14 		    && target_group.layout != Hy3GroupLayout::Tabbed
15-		    && this->shouldAtWorkspace(opening_into->workspace_id))
16+		    && this->shouldAutotileWorkspace(opening_into->workspace_id))
17 		{
18 			auto is_horizontal = target_group.layout == Hy3GroupLayout::SplitH;
19 			auto trigger = is_horizontal ? *at_trigger_width : *at_trigger_height;
20@@ -1716,7 +1716,7 @@ Hy3Node* Hy3Layout::shiftOrGetFocus(
21 	return nullptr;
22 }
23 
24-void Hy3Layout::updateAtWorkspaces() {
25+void Hy3Layout::updateAutotileWorkspaces() {
26 	static const auto* at_raw_workspaces
27 	    = &HyprlandAPI::getConfigValue(PHANDLE, "plugin:hy3:autotile:workspaces")->strValue;
28 
29@@ -1756,7 +1756,7 @@ void Hy3Layout::updateAtWorkspaces() {
30 	}
31 }
32 
33-bool Hy3Layout::shouldAtWorkspace(int workspace_id) {
34+bool Hy3Layout::shouldAutotileWorkspace(int workspace_id) {
35 	if (this->at_workspaces_blacklist) {
36 		return !this->at_workspaces.contains(workspace_id);
37 	} else {
38diff --git a/src/Hy3Layout.hpp b/src/Hy3Layout.hpp
39index a171c7e4500aed87c0015127cb717464ee27ef17..eacb27569443a64d882822adc58c8a8290ad296e 100644
40--- a/src/Hy3Layout.hpp
41+++ b/src/Hy3Layout.hpp
42@@ -139,8 +139,8 @@ private:
43 	// nullptr. if once is true, only one group will be broken out of / into
44 	Hy3Node* shiftOrGetFocus(Hy3Node&, ShiftDirection, bool shift, bool once, bool visible);
45 
46-	void updateAtWorkspaces();
47-	bool shouldAtWorkspace(int);
48+	void updateAutotileWorkspaces();
49+	bool shouldAutotileWorkspace(int);
50 
51 	std::string at_raw_workspaces;
52 	bool at_workspaces_blacklist;