| Filename | Latest commit message | Latest commit date |
|---|---|---|
|
|
||
| .gitignore | ||
| build.zig | ||
| build.zig.zon | ||
| Parser.zig | ||
| README.md | ||
| root.zig | ||
kosm_hyprlang
hyprlang for kosm: the hyprlang adapter, which edits the configs of Hypr programs written in
hyprlang (hyprpaper, hyprlock, hypridle). It claims no file extension, as .conf is far too
common: an app passes .lang = "hyprlang".
A file is key = value lines and name { ... } blocks, which may nest; paths step through the
blocks: background.path, decoration.blur.size. category:key = value is read as key
inside category (general.hide_cursor, device[my-mouse].sensitivity), and $NAME = value
defines a variable, set by the path $NAME. A key written twice is two entries, and so are two
blocks of one name (hyprpaper's wallpaper blocks), so set refuses to pick one and setAll /
setNth choose. # comments, # hyprlang directives and the file's layout are kept.
Values are written bare, # as ##. Colors default to rgba(rrggbbaa) and booleans to true /
false. Text holding a line break, a $, {{ or a backslash before a brace, or starting or
ending with a space, is refused; kosm.raw text is written as it is (to set $accent, say).
An empty value is filled in after the space following =.
Only edit is supported: kosm changes values in place and never adds keys or blocks.