ironbar icon indicating copy to clipboard operation
ironbar copied to clipboard

Support for dynamically generated config

Open JustSimplyKyle opened this issue 2 years ago • 2 comments

Is your feature request related to a problem? Please describe. Not currently, but this can be beneficial to complicated scripting.

Describe the solution you'd like https://elkowar.github.io/eww/configuration.html#dynamically-generated-widgets-with-literal Or the return_type of https://github.com/Alexays/Waybar/wiki/Module:-Custom basically, just a type of a module that supports generating entire "literal' widgets from scripts.

Additional context The existence of multiple config formats could be an issue. Since passing thru yaml configs aren't exactly easy if we follow the same as waybar and eww.

JustSimplyKyle avatar Apr 25 '23 12:04 JustSimplyKyle

I see no problem in making it support all config types, it would just have to detect which isn't too hard

yavko avatar Apr 25 '23 14:04 yavko

Yeah, I think the config should be fine. There's a library that loads whichever config file is found into the same type, and that's all handled with serde. In other words, I get nice rust structs out the other end no matter what, and don't need to parse the file. The only format I've not been able to support is XML because it's weird and different.

I'd say this sounds like it fits in nicely with the discussion last night in #105 regarding DSLs and potential Lua integration. Cairo will come first, but being able to build GTK widgets feels like the natural progression to that.

I personally find the Waybar implementation quite janky so I'd be less keen to go that route. I think eww does a much better job here, and probably fits in better with the DSL idea. So long as it's in a format that can be easily generated (ie so you can write a script that spits it out, rather than writing it by hand), I'm happy.

The other difficulty to consider is making sure it's implemented in an efficient way. I don't want to build an entire reactive UI framework into the bar, so the feature set might be quite limited (we'll see).

JakeStanger avatar Apr 25 '23 17:04 JakeStanger