update config value code

This commit is contained in:
Vaxry 2024-10-03 19:20:43 +01:00
parent 5a3f3ce012
commit 2676f8cd29

View file

@ -22,7 +22,10 @@ Every variable from the config needs to be found in a hashmap. To limit the
amount of hashmap searches, getting a config option looks like this:
```cpp
static auto* const PFOLLOWMOUSE = &g_pConfigManager->getConfigValuePtr("input:follow_mouse")->intValue;
static const auto PVARIABLE = CConfigValue<TYPE>("name");
// e.g.
static const auto PBORDERSIZE = CConfigValue<Hyprlang::INT>("general:border_size");
```
Since the hashmap _cannot_ be mutated during runtime, this pointer will always