Lokaltog / candybar

WebKit-based status bar for tiling window managers.
Other
225 stars 17 forks source link

widgets: added widget target in config.json #61

Closed alspore closed 10 years ago

alspore commented 10 years ago

Added the string target under the module key in config.json will set the widgets name to the specified javascript callback name. It should look something like this.

{
    "module": "desktops_ewmh",
    "target": "desktops",
    "config": {}
}
Lokaltog commented 10 years ago

I've been thinking about doing it this way, but I think it may become an issue in the future if we have to rely on users to correctly pass the widget name to the theme. It's definitely more flexible and simpler to do it this way though. The alternative I've thought about is to optionally try to load a string from the .so with a widget "group" or "type", in this case desktops, and pass both the names (desktops and desktops_ewmh) to the theme so the theme can decide what to do.