The official implementation library for the hypr config language.
Find a file
Mihai Fufezan e863ebcee9
Some checks are pending
Build & Test (Arch) / gcc build / ASan tests (push) Waiting to run
Build & Test (Arch) / gcc build / UBSan tests (push) Waiting to run
Build & Test (Arch) / gcc build / MSan tests (push) Waiting to run
Build & Test (Arch) / clang build / gcc test (push) Waiting to run
Build & Test (Arch) / Deploy docs (push) Waiting to run
Build & Test / nix (hyprlang) (push) Waiting to run
Build & Test / nix (hyprlang-with-tests) (push) Waiting to run
flake.lock: update
2025-05-07 20:11:54 +03:00
.github/workflows CI: remove deprecated magic-nix-cache-action 2025-02-08 23:08:34 +02:00
include docs: fix incorrect doc about getValue type 2025-02-25 17:18:11 +00:00
nix core: Move to hyprutils for util functions (#48) 2024-06-08 23:24:12 +02:00
src parser: add support for basic arithmetic 2025-05-07 17:50:22 +01:00
tests parser: add support for basic arithmetic 2025-05-07 17:50:22 +01:00
.clang-format initial commit 2023-12-28 20:38:01 +01:00
.clang-tidy clang-tidy: fix some errors (#70) 2025-04-22 23:23:39 +02:00
.gitignore API: add a templated config value wrapper 2024-12-13 20:48:06 +00:00
CMakeLists.txt parser: add support for basic arithmetic 2025-05-07 17:50:22 +01:00
COPYRIGHT repo: add COPYRIGHT file 2024-03-04 22:28:50 +00:00
flake.lock flake.lock: update 2025-05-07 20:11:54 +03:00
flake.nix flake.nix: use gcc14Stdenv, update 2024-12-14 13:01:16 +02:00
hyprlang-docs CI: deploy docs (#2) 2023-12-30 15:15:36 +01:00
hyprlang.pc.in use CMAKE_INSTALL_FULL_LIBDIR in pkgconfig instead of hardcoded lib 2024-01-09 17:20:04 +02:00
LICENSE Relicense hyprlang to lgpl 3 (#27) 2024-03-03 00:10:20 +00:00
README.md README: fix typo (#65) 2025-03-05 18:18:47 +02:00
VERSION version: bump to 0.6.1 2025-04-12 15:35:25 +01:00

hyprlang

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.

Building and installation

Building is done via CMake:

cmake --no-warn-unused-cli -DCMAKE_BUILD_TYPE:STRING=Release -DCMAKE_INSTALL_PREFIX:PATH=/usr -S . -B ./build
cmake --build ./build --config Release --target hyprlang -j`nproc 2>/dev/null || getconf _NPROCESSORS_CONF`

Install with:

sudo cmake --install ./build

Example config

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
    }
}

# variable
$NUM_ORDERS = 3

cakes {
    number = $NUM_ORDERS                    # use a variable
    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

Visit hyprland.org/hyprlang to see the documentation.

Example implementation

For an example implementation, take a look at the tests/ directory.