mirror of
https://github.com/hyprwm/hyprland-wiki.git
synced 2024-11-17 02:25:58 +01:00
823 B
823 B
title |
---|
PR Guidelines |
PR Requirements
- Clean, not hacky code
- Described changes and why they were there
- Following the style (see below)
Code Style
Hyprland's code style is governed by the .clang-format
file.
Make sure to format accordingly whenever you make a PR.
Some code FAQ
Why is the config variable getting so weird?
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:
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 be valid, and will not require hashmap lookups every single time it's read.