Use Lua as a config file language (#1010)

## What are the changes about?

Adds zlua for running Lua code as the configuration file.
Missing as of this time:
- ~~Parsing custom binds and labels~~
- ~~Fix memory leaks~~
- ~~Investigate issue with animation colours~~
- ~~Add examples and default config~~

## What existing issue does this resolve?

[#976](https://codeberg.org/fairyglade/ly/issues/976)

## Pre-requisites

- [ ] I have tested & confirmed the changes work locally
- [ ] I have run `zig fmt` throughout my changes

Reviewed-on: https://codeberg.org/fairyglade/ly/pulls/1010
Reviewed-by: AnErrupTion <anerruption+codeberg@disroot.org>
This commit is contained in:
Titanium Brain
2026-08-24 15:35:01 +02:00
committed by AnErrupTion
parent 882815343f
commit b9742203ee
12 changed files with 833 additions and 39 deletions

View File

@@ -249,12 +249,14 @@ You can, of course, still select the init system of your choice when using this
## Configuration
You can find all the configuration in `/etc/ly/config.ini`. The file is fully commented, and includes the default values.
You can find all the configuration in `/etc/ly/config.lua`. The file is fully commented, and includes the default values.
It uses the Lua language, which means you can make the configuration dynamic. You could, for example, choose a random animation each time Ly starts up.
You may also check the validity of your configuration file (i.e. if there are any errors in it) with the following command:
```
$ ly --validate-config /etc/ly/config.ini
$ ly --validate-config /etc/ly/config.lua
```
## Controls