Skip to content

acidburnmonkey/hyprlang-pybind

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

hyprlang-pybind

Python bindings for hyprlang, the configuration language used by Hyprland and other Hypr projects.

Built with pybind11, providing both a high-level Pythonic API and a low-level API that mirrors the C++ interface.

Quick Start

import hyprlang_pybind as hyprlang

data = hyprlang.parse_string("""
general {
    border_size = 3
    gaps_in = 5.0
    layout = dwindle
}
""")

print(data["general"]["border_size"])  # 3
print(data["general"]["gaps_in"])      # 5.0
print(data["general"]["layout"])       # "dwindle"

Schema is optional. When omitted, keys and types are auto-inferred from the config contents. You can also provide an explicit schema for precise type control:

data = hyprlang.parse_file("/path/to/config.conf", schema={
    "general": {
        "border_size": 0,
        "gaps_in": 0.0,
        "layout": "",
    },
})

Documentation

About

Python bindings for Hyprlang

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors