hyprlang/README.md

58 lines
1.5 KiB
Markdown
Raw Normal View History

2023-12-28 17:01:04 +01:00
# hyprlang
2023-12-29 20:05:45 +01:00
2023-12-28 20:50:54 +01:00
The hypr configuration language is an extremely efficient, yet easy to work with, configuration language
for linux applications.
It's user-friendly, easy to grasp, and easy to implement.
2023-12-29 20:05:45 +01:00
## Building and installation
Building is done via CMake:
```sh
cmake --no-warn-unused-cli -DCMAKE_BUILD_TYPE:STRING=Release -DCMAKE_INSTALL_PREFIX:PATH=/usr -S . -B ./build
2023-12-29 20:05:45 +01:00
cmake --build ./build --config Release --target hyprlang -j`nproc 2>/dev/null || getconf NPROCESSORS_CONF`
```
Install with:
```sh
cmake --install ./build
```
2023-12-28 20:50:54 +01:00
## Example config
```ini
bakery {
counter_color = rgba(ee22eeff) # color by rgba()
door_color = rgba(122, 176, 91, 0.1) # color by rgba()
dimensions = 10 20 # vec2
employees = 3 # int
average_time_spent = 8.13 # float
hackers_password = 0xDEADBEEF # int, as hex
# nested categories
secrets {
password = hyprland # string
}
}
2023-12-29 12:03:19 +01:00
# variable
$NUM_ORDERS = 3
2023-12-28 20:50:54 +01:00
cakes {
2023-12-29 12:03:19 +01:00
number = $NUM_ORDERS # use a variable
2023-12-28 20:50:54 +01:00
colors = red, green, blue # string
}
# keywords, invoke your own handler with the parameters
add_baker = Jeremy, 26, Warsaw
add_baker = Andrew, 21, Berlin
add_baker = Koichi, 18, Morioh
```
## Docs
2023-12-30 15:15:36 +01:00
Visit [hyprland.org/hyprlang](https://hyprland.org/hyprlang) to see the documentation.
2023-12-30 15:34:33 +01:00
### Example implementation
For an example implmentation, take a look at the `tests/` directory.