Waybar icon indicating copy to clipboard operation
Waybar copied to clipboard

[Sugestion] Use Lua for complex configurations

Open Diegovsky opened this issue 4 years ago • 2 comments

I've been using waybar for a while, and it is awesome how configurable it is. But one thing I noticed is the users (me included :p) want to do much more than what Json allows. So, I propose to use Lua as an alternative "configuration" format, but contrary to #434, I think Jsons should still be used for simple setups, and Lua should be used to make more advanced stuff. With this, #564, #417, #658, #631 and #731 could be solved.

Of course, this requires great effort. However, the Neovim team is working on bringing Lua bindings for it along with async support. Also, they've already worked out the hardest parts of this problem: configuration, extensibility and asynchronous execution, so I believe custom modules can benefit a lot from it. I'm confident this is a good solution, since it opens space for more extensibilty. I'm willing to work on it if it gets approved. What do you think?

Diegovsky avatar May 17 '21 02:05 Diegovsky

This would be awesome. I could see a use case where values for variables are declared dynamically for everything especially on startup. I know you can execute scripts but it's much better when you can just code inside the config like in neovim.

rickswe avatar Mar 27 '24 20:03 rickswe

yup! better than a json

Diegovsky avatar Apr 09 '24 23:04 Diegovsky