cdb2c28df1f404cb814d188160f31f33c95b5f6c

Author
outfoxxed <outfoxxed@outfoxxed.me>
Committer
outfoxxed <outfoxxed@outfoxxed.me>
Date

Message

Migrate config to hyprlang

Diff

This diff is truncated to protect this page.

  1diff --git a/flake.lock b/flake.lock
  2index d4b336c89ec2a7a5de2ba1822bb68763065d233c..bb5cb706f48c495c6bc9cd0da27de7af8fdbf4f2 100644
  3--- a/flake.lock
  4+++ b/flake.lock
  5@@ -3,17 +3,18 @@
  6     "hyprland": {
  7       "inputs": {
  8         "hyprland-protocols": "hyprland-protocols",
  9+        "hyprlang": "hyprlang",
 10         "nixpkgs": "nixpkgs",
 11         "systems": "systems",
 12         "wlroots": "wlroots",
 13         "xdph": "xdph"
 14       },
 15       "locked": {
 16-        "lastModified": 1707847639,
 17-        "narHash": "sha256-mBmt1lFImpIK8VwHkJIenzVS95wD67dsfH1oRk2RiEg=",
 18+        "lastModified": 1707952083,
 19+        "narHash": "sha256-DYt7APLnlG28Cj+KigYtlQrQ1W6DcHw5z7QXW+RDpa4=",
 20         "owner": "hyprwm",
 21         "repo": "Hyprland",
 22-        "rev": "2a3429d4cfdc01794b9d6fc1b49be1da019b5606",
 23+        "rev": "3a6451b6026a5f38987e61ee07b442910b5432f5",
 24         "type": "github"
 25       },
 26       "original": {
 27@@ -48,6 +49,27 @@
 28       }
 29     },
 30     "hyprlang": {
 31+      "inputs": {
 32+        "nixpkgs": [
 33+          "hyprland",
 34+          "nixpkgs"
 35+        ]
 36+      },
 37+      "locked": {
 38+        "lastModified": 1707842572,
 39+        "narHash": "sha256-dYGkJycYJ0RjfkKE98XtppQukr6AHkR5bPJN0GsJeTI=",
 40+        "owner": "hyprwm",
 41+        "repo": "hyprlang",
 42+        "rev": "4a464738e2d12bf3a9735831f784969c7568a4af",
 43+        "type": "github"
 44+      },
 45+      "original": {
 46+        "owner": "hyprwm",
 47+        "repo": "hyprlang",
 48+        "type": "github"
 49+      }
 50+    },
 51+    "hyprlang_2": {
 52       "inputs": {
 53         "nixpkgs": [
 54           "hyprland",
 55@@ -130,7 +152,7 @@
 56           "hyprland",
 57           "hyprland-protocols"
 58         ],
 59-        "hyprlang": "hyprlang",
 60+        "hyprlang": "hyprlang_2",
 61         "nixpkgs": [
 62           "hyprland",
 63           "nixpkgs"
 64diff --git a/src/Hy3Layout.cpp b/src/Hy3Layout.cpp
 65index a99dd96bb5fb3fba9baae3362de000390d062931..dde4c3147bbd37abc298a050d7982d45cd9d4783 100644
 66--- a/src/Hy3Layout.cpp
 67+++ b/src/Hy3Layout.cpp
 68@@ -179,8 +179,8 @@ void Hy3Layout::insertNode(Hy3Node& node) {
 69 		opening_into = opening_after->parent;
 70 	} else {
 71 		if ((opening_into = this->getWorkspaceRootGroup(node.workspace_id)) == nullptr) {
 72-			static const auto* tab_first_window =
 73-			    &HyprlandAPI::getConfigValue(PHANDLE, "plugin:hy3:tab_first_window")->intValue;
 74+			static const auto tab_first_window =
 75+			    ConfigValue<Hyprlang::INT>("plugin:hy3:tab_first_window");
 76 
 77 			auto width =
 78 			    monitor->vecSize.x - monitor->vecReservedBottomRight.x - monitor->vecReservedTopLeft.x;
 79@@ -233,10 +233,10 @@ void Hy3Layout::insertNode(Hy3Node& node) {
 80 
 81 	{
 82 		// clang-format off
 83-		static const auto* at_enable = &HyprlandAPI::getConfigValue(PHANDLE, "plugin:hy3:autotile:enable")->intValue;
 84-		static const auto* at_ephemeral = &HyprlandAPI::getConfigValue(PHANDLE, "plugin:hy3:autotile:ephemeral_groups")->intValue;
 85-		static const auto* at_trigger_width = &HyprlandAPI::getConfigValue(PHANDLE, "plugin:hy3:autotile:trigger_width")->intValue;
 86-		static const auto* at_trigger_height = &HyprlandAPI::getConfigValue(PHANDLE, "plugin:hy3:autotile:trigger_height")->intValue;
 87+		static const auto at_enable = ConfigValue<Hyprlang::INT>("plugin:hy3:autotile:enable");
 88+		static const auto at_ephemeral = ConfigValue<Hyprlang::INT>("plugin:hy3:autotile:ephemeral_groups");
 89+		static const auto at_trigger_width = ConfigValue<Hyprlang::INT>("plugin:hy3:autotile:trigger_width");
 90+		static const auto at_trigger_height = ConfigValue<Hyprlang::INT>("plugin:hy3:autotile:trigger_height");
 91 		// clang-format on
 92 
 93 		this->updateAutotileWorkspaces();
 94@@ -287,8 +287,8 @@ void Hy3Layout::insertNode(Hy3Node& node) {
 95 }
 96 
 97 void Hy3Layout::onWindowRemovedTiling(CWindow* window) {
 98-	static const auto* node_collapse_policy =
 99-	    &HyprlandAPI::getConfigValue(PHANDLE, "plugin:hy3:node_collapse_policy")->intValue;
100+	static const auto node_collapse_policy =
101+	    ConfigValue<Hyprlang::INT>("plugin:hy3:node_collapse_policy");
102 
103 	auto* node = this->getNodeFromWindow(window);
104 
105@@ -398,8 +398,7 @@ void Hy3Layout::recalculateWindow(CWindow* window) {
106 }
107 
108 ShiftDirection reverse(ShiftDirection direction) {
109-	switch (direction)
110-	{
111+	switch (direction) {
112 	case ShiftDirection::Left: return ShiftDirection::Right;
113 	case ShiftDirection::Right: return ShiftDirection::Left;
114 	case ShiftDirection::Up: return ShiftDirection::Down;
115@@ -414,53 +413,56 @@ void Hy3Layout::resizeActiveWindow(const Vector2D& delta, eRectCorner corner, CW
116 
117 	auto* node = this->getNodeFromWindow(window);
118 
119-	if(node != nullptr) {
120+	if (node != nullptr) {
121 		node = &node->getExpandActor();
122 
123 		auto monitor = g_pCompositor->getMonitorFromID(window->m_iMonitorID);
124 
125 		const bool display_left =
126-			STICKS(node->position.x, monitor->vecPosition.x + monitor->vecReservedTopLeft.x);
127+		    STICKS(node->position.x, monitor->vecPosition.x + monitor->vecReservedTopLeft.x);
128 		const bool display_right = STICKS(
129-			node->position.x + node->size.x,
130-			monitor->vecPosition.x + monitor->vecSize.x - monitor->vecReservedBottomRight.x
131+		    node->position.x + node->size.x,
132+		    monitor->vecPosition.x + monitor->vecSize.x - monitor->vecReservedBottomRight.x
133 		);
134 		const bool display_top =
135-			STICKS(node->position.y, monitor->vecPosition.y + monitor->vecReservedTopLeft.y);
136+		    STICKS(node->position.y, monitor->vecPosition.y + monitor->vecReservedTopLeft.y);
137 		const bool display_bottom = STICKS(
138-			node->position.y + node->size.y,
139-			monitor->vecPosition.y + monitor->vecSize.y - monitor->vecReservedBottomRight.y
140+		    node->position.y + node->size.y,
141+		    monitor->vecPosition.y + monitor->vecSize.y - monitor->vecReservedBottomRight.y
142 		);
143 
144 		Vector2D resize_delta = delta;
145 		bool node_is_root = (node->data.type == Hy3NodeType::Group && node->parent == nullptr)
146-			|| (node->data.type == Hy3NodeType::Window && (node->parent == nullptr || node->parent->parent == nullptr));
147+		                 || (node->data.type == Hy3NodeType::Window
148+		                     && (node->parent == nullptr || node->parent->parent == nullptr));
149 
150-		if(node_is_root) {
151+		if (node_is_root) {
152 			if (display_left && display_right) resize_delta.x = 0;
153 			if (display_top && display_bottom) resize_delta.y = 0;
154 		}
155 
156 		// Don't execute the logic unless there's something to do
157-		if(resize_delta.x != 0 || resize_delta.y != 0) {
158+		if (resize_delta.x != 0 || resize_delta.y != 0) {
159 			ShiftDirection target_edge_x;
160 			ShiftDirection target_edge_y;
161 
162 			// Determine the direction in which we're going to look for the neighbor node
163 			// that will be resized
164-			if(corner == CORNER_NONE) {			// It's probably a keyboard event.
165+			if (corner == CORNER_NONE) { // It's probably a keyboard event.
166 				target_edge_x = display_right ? ShiftDirection::Left : ShiftDirection::Right;
167 				target_edge_y = display_bottom ? ShiftDirection::Up : ShiftDirection::Down;
168diff --git a/src/Hy3Layout.hpp b/src/Hy3Layout.hpp
169index f9128493a1591a80908831a78e2e2df9a153d04d..766d0bba9d3a5ed5d6d6a9410d6adc646ad15108 100644
170--- a/src/Hy3Layout.hpp
171+++ b/src/Hy3Layout.hpp
172@@ -20,11 +20,7 @@ enum class ShiftDirection {
173 	Right,
174 };
175 
176-enum class Axis {
177-	None,
178-	Horizontal,
179-	Vertical
180-};
181+enum class Axis { None, Horizontal, Vertical };
182 
183 #include "Hy3Node.hpp"
184 #include "TabGroup.hpp"
185diff --git a/src/Hy3Node.cpp b/src/Hy3Node.cpp
186index d666d4897760811792342dbaa649a222fdf67ff3..59264f27ce60cb333ebba325f76b4c2ca5e11087 100644
187--- a/src/Hy3Node.cpp
188+++ b/src/Hy3Node.cpp
189@@ -270,11 +270,11 @@ Hy3Node& Hy3Node::getExpandActor() {
190 
191 void Hy3Node::recalcSizePosRecursive(bool no_animation) {
192 	// clang-format off
193-	static const auto* gaps_in = &HyprlandAPI::getConfigValue(PHANDLE, "general:gaps_in")->intValue;
194-	static const auto* gaps_out = &HyprlandAPI::getConfigValue(PHANDLE, "general:gaps_out")->intValue;
195-	static const auto* group_inset = &HyprlandAPI::getConfigValue(PHANDLE, "plugin:hy3:group_inset")->intValue;
196-	static const auto* tab_bar_height = &HyprlandAPI::getConfigValue(PHANDLE, "plugin:hy3:tabs:height")->intValue;
197-	static const auto* tab_bar_padding = &HyprlandAPI::getConfigValue(PHANDLE, "plugin:hy3:tabs:padding")->intValue;
198+	static const auto gaps_in = ConfigValue<Hyprlang::INT>("general:gaps_in");
199+	static const auto gaps_out = ConfigValue<Hyprlang::INT>("general:gaps_out");
200+	static const auto group_inset = ConfigValue<Hyprlang::INT>("plugin:hy3:group_inset");
201+	static const auto tab_bar_height = ConfigValue<Hyprlang::INT>("plugin:hy3:tabs:height");
202+	static const auto tab_bar_padding = ConfigValue<Hyprlang::INT>("plugin:hy3:tabs:padding");
203 	// clang-format on
204 
205 	if (this->data.type == Hy3NodeType::Window && this->data.as_window->m_bIsFullscreen) {
206@@ -810,18 +810,13 @@ bool Hy3Node::swallowGroups(Hy3Node* into) {
207 	return true;
208 }
209 
210-Hy3Node* getOuterChild(Hy3GroupData &group, ShiftDirection direction) {
211+Hy3Node* getOuterChild(Hy3GroupData& group, ShiftDirection direction) {
212 	switch (direction) {
213-		case ShiftDirection::Left:
214-		case ShiftDirection::Up:
215-			return group.children.front();
216-			break;
217-		case ShiftDirection::Right:
218-		case ShiftDirection::Down:
219-			return group.children.back();
220-			break;
221-		default:
222-			return nullptr;
223+	case ShiftDirection::Left:
224+	case ShiftDirection::Up: return group.children.front(); break;
225+	case ShiftDirection::Right:
226+	case ShiftDirection::Down: return group.children.back(); break;
227+	default: return nullptr;
228 	}
229 }
230 
231@@ -830,22 +825,17 @@ Hy3Node* Hy3Node::getImmediateSibling(ShiftDirection direction) {
232 
233 	auto iter = std::find(group.children.begin(), group.children.end(), this);
234 
235-	std::__cxx11::list<Hy3Node *>::const_iterator list_sibling;
236+	std::__cxx11::list<Hy3Node*>::const_iterator list_sibling;
237 
238 	switch (direction) {
239-		case ShiftDirection::Left:
240-		case ShiftDirection::Up:
241-			list_sibling = std::prev(iter);
242-			break;
243-		case ShiftDirection::Right:
244-		case ShiftDirection::Down:
245-			list_sibling = std::next(iter);
246-			break;
247-		default:
248-			list_sibling = iter;
249+	case ShiftDirection::Left:
250+	case ShiftDirection::Up: list_sibling = std::prev(iter); break;
251+	case ShiftDirection::Right:
252+	case ShiftDirection::Down: list_sibling = std::next(iter); break;
253+	default: list_sibling = iter;
254 	}
255 
256-	if(list_sibling == group.children.end()) {
257+	if (list_sibling == group.children.end()) {
258 		hy3_log(WARN, "getImmediateSibling: sibling not found");
259 		list_sibling = iter;
260 	}
261@@ -854,28 +844,20 @@ Hy3Node* Hy3Node::getImmediateSibling(ShiftDirection direction) {
262 }
263 
264 Axis getAxis(Hy3GroupLayout layout) {
265-	switch (layout)
266-	{
267-	case Hy3GroupLayout::SplitH:
268-		return Axis::Horizontal;
269-	case Hy3GroupLayout::SplitV:
270-		return Axis::Vertical;
271-	default:
272-		return Axis::None;
273+	switch (layout) {
274+	case Hy3GroupLayout::SplitH: return Axis::Horizontal;
275+	case Hy3GroupLayout::SplitV: return Axis::Vertical;
276+	default: return Axis::None;
277 	}
278 }
279 
280 Axis getAxis(ShiftDirection direction) {
281-	switch (direction)
282-	{
283+	switch (direction) {
284 	case ShiftDirection::Left:
285-	case ShiftDirection::Right:
286-		return Axis::Horizontal;
287+	case ShiftDirection::Right: return Axis::Horizontal;
288 	case ShiftDirection::Down:
289diff --git a/src/TabGroup.cpp b/src/TabGroup.cpp
290index af2d989c02a33b612546ab0dc1e73cc660aaa06b..b48a7848281c996e19ff8122dc445ee805182ed3 100644
291--- a/src/TabGroup.cpp
292+++ b/src/TabGroup.cpp
293@@ -126,18 +126,18 @@ bool Hy3TabBarEntry::shouldRemove() {
294 
295 void Hy3TabBarEntry::prepareTexture(float scale, CBox& box) {
296 	// clang-format off
297-	static const auto* s_rounding = &HyprlandAPI::getConfigValue(PHANDLE, "plugin:hy3:tabs:rounding")->intValue;
298-	static const auto* render_text = &HyprlandAPI::getConfigValue(PHANDLE, "plugin:hy3:tabs:render_text")->intValue;
299-	static const auto* text_center = &HyprlandAPI::getConfigValue(PHANDLE, "plugin:hy3:tabs:text_center")->intValue;
300-	static const auto* text_font = &HyprlandAPI::getConfigValue(PHANDLE, "plugin:hy3:tabs:text_font")->strValue;
301-	static const auto* text_height = &HyprlandAPI::getConfigValue(PHANDLE, "plugin:hy3:tabs:text_height")->intValue;
302-	static const auto* text_padding = &HyprlandAPI::getConfigValue(PHANDLE, "plugin:hy3:tabs:text_padding")->intValue;
303-	static const auto* col_active = &HyprlandAPI::getConfigValue(PHANDLE, "plugin:hy3:tabs:col.active")->intValue;
304-	static const auto* col_urgent = &HyprlandAPI::getConfigValue(PHANDLE, "plugin:hy3:tabs:col.urgent")->intValue;
305-	static const auto* col_inactive = &HyprlandAPI::getConfigValue(PHANDLE, "plugin:hy3:tabs:col.inactive")->intValue;
306-	static const auto* col_text_active = &HyprlandAPI::getConfigValue(PHANDLE, "plugin:hy3:tabs:col.text.active")->intValue;
307-	static const auto* col_text_urgent = &HyprlandAPI::getConfigValue(PHANDLE, "plugin:hy3:tabs:col.text.urgent")->intValue;
308-	static const auto* col_text_inactive = &HyprlandAPI::getConfigValue(PHANDLE, "plugin:hy3:tabs:col.text.inactive")->intValue;
309+	static const auto s_rounding = ConfigValue<Hyprlang::INT>("plugin:hy3:tabs:rounding");
310+	static const auto render_text = ConfigValue<Hyprlang::INT>("plugin:hy3:tabs:render_text");
311+	static const auto text_center = ConfigValue<Hyprlang::INT>("plugin:hy3:tabs:text_center");
312+	static const auto text_font = ConfigValue<Hyprlang::STRING>("plugin:hy3:tabs:text_font");
313+	static const auto text_height = ConfigValue<Hyprlang::INT>("plugin:hy3:tabs:text_height");
314+	static const auto text_padding = ConfigValue<Hyprlang::INT>("plugin:hy3:tabs:text_padding");
315+	static const auto col_active = ConfigValue<Hyprlang::INT>("plugin:hy3:tabs:col.active");
316+	static const auto col_urgent = ConfigValue<Hyprlang::INT>("plugin:hy3:tabs:col.urgent");
317+	static const auto col_inactive = ConfigValue<Hyprlang::INT>("plugin:hy3:tabs:col.inactive");
318+	static const auto col_text_active = ConfigValue<Hyprlang::INT>("plugin:hy3:tabs:col.text.active");
319+	static const auto col_text_urgent = ConfigValue<Hyprlang::INT>("plugin:hy3:tabs:col.text.urgent");
320+	static const auto col_text_inactive = ConfigValue<Hyprlang::INT>("plugin:hy3:tabs:col.text.inactive");
321 	// clang-format on
322 
323 	auto width = box.width;
324@@ -227,7 +227,7 @@ void Hy3TabBarEntry::prepareTexture(float scale, CBox& box) {
325 
326 			if (*text_center) pango_layout_set_alignment(layout, PANGO_ALIGN_CENTER);
327 
328-			PangoFontDescription* font_desc = pango_font_description_from_string(text_font->c_str());
329+			PangoFontDescription* font_desc = pango_font_description_from_string(*text_font);
330 			pango_font_description_set_size(font_desc, *text_height * scale * PANGO_SCALE);
331 			pango_layout_set_font_description(layout, font_desc);
332 			pango_font_description_free(font_desc);
333@@ -452,10 +452,9 @@ Hy3TabGroup::Hy3TabGroup(Hy3Node& node) {
334 }
335 
336 void Hy3TabGroup::updateWithGroup(Hy3Node& node, bool warp) {
337-	static const auto* gaps_in = &HyprlandAPI::getConfigValue(PHANDLE, "general:gaps_in")->intValue;
338-	static const auto* gaps_out = &HyprlandAPI::getConfigValue(PHANDLE, "general:gaps_out")->intValue;
339-	static const auto* bar_height =
340-	    &HyprlandAPI::getConfigValue(PHANDLE, "plugin:hy3:tabs:height")->intValue;
341+	static const auto gaps_in = ConfigValue<Hyprlang::INT>("general:gaps_in");
342+	static const auto gaps_out = ConfigValue<Hyprlang::INT>("general:gaps_out");
343+	static const auto bar_height = ConfigValue<Hyprlang::INT>("plugin:hy3:tabs:height");
344 
345 	auto gaps = node.parent == nullptr ? *gaps_out : *gaps_in;
346 	auto tpos = node.position + Vector2D(gaps, gaps) + node.gap_topleft_offset;
347@@ -484,10 +483,8 @@ void Hy3TabGroup::updateWithGroup(Hy3Node& node, bool warp) {
348 }
349 
350 void Hy3TabGroup::tick() {
351-	static const auto* enter_from_top =
352-	    &HyprlandAPI::getConfigValue(PHANDLE, "plugin:hy3:tabs:from_top")->intValue;
353-	static const auto* padding =
354-	    &HyprlandAPI::getConfigValue(PHANDLE, "plugin:hy3:tabs:padding")->intValue;
355+	static const auto enter_from_top = ConfigValue<Hyprlang::INT>("plugin:hy3:tabs:from_top");
356+	static const auto padding = ConfigValue<Hyprlang::INT>("plugin:hy3:tabs:padding");
357 	auto* workspace = g_pCompositor->getWorkspaceByID(this->workspace_id);
358 
359 	this->bar.tick();
360@@ -528,12 +525,9 @@ void Hy3TabGroup::tick() {
361 }
362 
363 void Hy3TabGroup::renderTabBar() {
364-	static const auto* window_rounding =
365-	    &HyprlandAPI::getConfigValue(PHANDLE, "decoration:rounding")->intValue;
366-	static const auto* enter_from_top =
367-	    &HyprlandAPI::getConfigValue(PHANDLE, "plugin:hy3:tabs:from_top")->intValue;
368-	static const auto* padding =
369-	    &HyprlandAPI::getConfigValue(PHANDLE, "plugin:hy3:tabs:padding")->intValue;
370+	static const auto window_rounding = ConfigValue<Hyprlang::INT>("decoration:rounding");
371+	static const auto enter_from_top = ConfigValue<Hyprlang::INT>("plugin:hy3:tabs:from_top");
372+	static const auto padding = ConfigValue<Hyprlang::INT>("plugin:hy3:tabs:padding");
373 
374 	auto* monitor = g_pHyprOpenGL->m_RenderData.pMonitor;
375 	auto* workspace = g_pCompositor->getWorkspaceByID(this->workspace_id);
376diff --git a/src/globals.hpp b/src/globals.hpp
377index f2032d9754909a6250efaf07a61a3953e5fb8b30..fbaabe506bb56386e9fab48b65d9a97d86da9e2b 100644
378--- a/src/globals.hpp
379+++ b/src/globals.hpp
380@@ -1,6 +1,7 @@
381 #pragma once
382 
383 #include <hyprland/src/plugins/PluginAPI.hpp>
384+#include <hyprlang.hpp>
385 
386 #include "Hy3Layout.hpp"
387 #include "log.hpp"
388@@ -19,3 +20,24 @@ inline void errorNotif() {
389 	    }
390 	);
391 }
392+
393+template <typename T>
394+class ConfigValue {
395+public:
396+	ConfigValue(const std::string& option) {
397+		this->static_data_ptr = HyprlandAPI::getConfigValue(PHANDLE, option)->getDataStaticPtr();
398+	}
399+
400+	const T& get() const { return *(T*) *this->static_data_ptr; }
401+
402+	const T& operator*() const { return this->get(); }
403+
404+private:
405+	void* const* static_data_ptr;
406+};
407+
408+// Bullshit undocumented microptimization case for strings
409+template <>
410+inline const Hyprlang::STRING& ConfigValue<Hyprlang::STRING>::get() const {
411+	return *(char* const*) this->static_data_ptr;
412+}
413diff --git a/src/main.cpp b/src/main.cpp
414index 249e14c98b1862dbbf08323e0b38d6a298b4c7d4..a7f69a9fc0f9a12897fa5fa86a90df17a996787e 100644
415--- a/src/main.cpp
416+++ b/src/main.cpp
417@@ -1,6 +1,3 @@
418-#include <optional>
419-#include <stdexcept>
420-
421 #include <hyprland/src/Compositor.hpp>
422 #include <hyprland/src/plugins/PluginAPI.hpp>
423 #include <hyprland/src/version.h>
424@@ -30,37 +27,41 @@ APICALL EXPORT PLUGIN_DESCRIPTION_INFO PLUGIN_INIT(HANDLE handle) {
425 	selection_hook::init();
426 
427 #define CONF(NAME, TYPE, VALUE)                                                                    \
428-	HyprlandAPI::addConfigValue(PHANDLE, "plugin:hy3:" NAME, SConfigValue {.TYPE##Value = VALUE})
429+	HyprlandAPI::addConfigValue(                                                                     \
430+	    PHANDLE,                                                                                     \
431+	    "plugin:hy3:" NAME,                                                                          \
432+	    Hyprlang::CConfigValue((Hyprlang::TYPE) VALUE)                                               \
433+	)
434 
435 	// general
436-	CONF("no_gaps_when_only", int, 0);
437-	CONF("node_collapse_policy", int, 2);
438-	CONF("group_inset", int, 10);
439-	CONF("tab_first_window", int, 0);
440+	CONF("no_gaps_when_only", INT, 0);
441+	CONF("node_collapse_policy", INT, 2);
442+	CONF("group_inset", INT, 10);
443+	CONF("tab_first_window", INT, 0);
444 
445 	// tabs
446-	CONF("tabs:height", int, 15);
447-	CONF("tabs:padding", int, 5);
448-	CONF("tabs:from_top", int, 0);
449-	CONF("tabs:rounding", int, 3);
450-	CONF("tabs:render_text", int, 1);
451-	CONF("tabs:text_center", int, 0);
452-	CONF("tabs:text_font", str, "Sans");
453-	CONF("tabs:text_height", int, 8);
454-	CONF("tabs:text_padding", int, 3);
455-	CONF("tabs:col.active", int, 0xff32b4ff);
456-	CONF("tabs:col.urgent", int, 0xffff4f4f);
457-	CONF("tabs:col.inactive", int, 0x80808080);
458-	CONF("tabs:col.text.active", int, 0xff000000);
459-	CONF("tabs:col.text.urgent", int, 0xff000000);
460-	CONF("tabs:col.text.inactive", int, 0xff000000);
461+	CONF("tabs:height", INT, 15);
462+	CONF("tabs:padding", INT, 5);
463+	CONF("tabs:from_top", INT, 0);
464+	CONF("tabs:rounding", INT, 3);
465+	CONF("tabs:render_text", INT, 1);
466+	CONF("tabs:text_center", INT, 0);
467+	CONF("tabs:text_font", STRING, "Sans");
468+	CONF("tabs:text_height", INT, 8);
469+	CONF("tabs:text_padding", INT, 3);
470+	CONF("tabs:col.active", INT, 0xff32b4ff);
471+	CONF("tabs:col.urgent", INT, 0xffff4f4f);
472+	CONF("tabs:col.inactive", INT, 0x80808080);
473+	CONF("tabs:col.text.active", INT, 0xff000000);
474+	CONF("tabs:col.text.urgent", INT, 0xff000000);
475+	CONF("tabs:col.text.inactive", INT, 0xff000000);
476 
477 	// autotiling
478-	CONF("autotile:enable", int, 0);
479-	CONF("autotile:ephemeral_groups", int, 1);
480-	CONF("autotile:trigger_height", int, 0);
481-	CONF("autotile:trigger_width", int, 0);
482-	CONF("autotile:workspaces", str, "all");
483+	CONF("autotile:enable", INT, 0);
484+	CONF("autotile:ephemeral_groups", INT, 1);
485+	CONF("autotile:trigger_height", INT, 0);
486+	CONF("autotile:trigger_width", INT, 0);
487+	CONF("autotile:workspaces", STRING, "all");
488 
489 #undef CONF
490