Skip to content

Lua scripting support #565

@ppebb

Description

@ppebb

Description

The ability to invoke arbitrary bash scripts for certain events is incredibly useful. However, certain shortcomings like latency and ease-of-use are present. I think allowing configuration to be done fully in lua (or another similarly powerful scripting language) would be very useful.

Proposed solution

Something akin to an init.lua could be loaded at launch, which would then register callbacks for events such as on_song_change, with the same variables being passed to those callbacks as the environment variables passed to existing bash scripts. The same functionality available over the remote protocol could be exposed as lua functions, such as modifying configuration and themes.

I believe this would be a better alternative to the current .ron configuration as well as something such as switching to toml (#255), as it would enable more complex setups to behave more gracefully and eliminate the awkward split between config and themes by allowing the user to manage it however they please.

I do not see this as being too difficult to accomplish (mayhaps I am overly optimistic), and I'd be more than happy to take a shot at implementing something like this myself.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions