mirror of
https://github.com/hyprwm/hyprland-wiki.git
synced 2024-11-25 22:15:59 +01:00
update config value code
This commit is contained in:
parent
5a3f3ce012
commit
2676f8cd29
1 changed files with 4 additions and 1 deletions
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue