elkowar / eww

ElKowars wacky widgets
https://elkowar.github.io/eww
MIT License
9.41k stars 381 forks source link

[FEATURE] configuration library #591

Open oldwomanjosiah opened 2 years ago

oldwomanjosiah commented 2 years ago

Description of the requested feature

It would be really nice to have a consistent location where configuration "libraries" could be installed, akin to neovim plugins. This would make it easier to share components between users, which would likely help eww grow.

Lazy loading, namespacing

For this to be viable without slowing things down too much, I would think that we would want to namespace plugins (we really wouldn't want every name to have to start with the plugin name). This could be done with the following new syntax:

(import plugin-name.widget1)
(import plugin-name)

(widget1 :arg1 "value1")
(plugin-name.widget2 :arg2 "value2")

(it would also be nice if this syntax could also be extended to import "local" configuration without getting re-def errors)

oldwomanjosiah commented 2 years ago

I would also be interested in working on this, probably starting with the import syntax

oldwomanjosiah commented 2 years ago

@Battlesquid would the use case for #552 be covered by the import syntax described here?

Battlesquid commented 1 year ago

Apologies for the extremely late response. Yes, the syntax matches what I have in mind. Great expansion on my original feature request, thank you!