[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Feature Request: Command Plugins



Hi,

Sorry that you had to wait so long.

On Fri, Jan 25, 2013 at 02:07:31PM -0800, Tyler Thomas Hart wrote:
> I'm currently researching loadable dynamic libraries (no prior
> experience), so hopefully someone with more wisdom could weigh in.
> 
> Using glibs module system, it seems that plugins that allow the user
> to add server-side commands could be fairly easily implemented. This
> would keep the core source slim, but allow people [like me, who write
> stupid, inelegant, and mostly unneeded things] to enable commands that
> just aren't possible with client- side scripting, without having to
> deal with a patch system/alternative branches if they want to share
> their work.

Generally I like the idea of the small core with extensibility. But with
plugins, I fear that the core becomes unstable: if the plugin crashes
the entire window manager crashes.

And sharing plugins is not easy, because the internal structure may
change completely. But I guarantee that the commands, settings and
attributes do not change (except for small changes, documented by the
MIGRATION[1] file). And if your plugin (i.e. command) is so stable
that it is maintained in the main git-repo then I directly can merge it
to the 'core'. :)

> One thing I'm unsure about is the scope these external libraries would
> have. Would they be able to access the frame tree, for example? If
> not, this idea is pretty useless.

Plugins would have access to all internal structures, i.e. also to the
frame tree.

Is there any data or internal hlwm state that is not accessible yet by
the commands? Personally, I would prefer integrating the client into
scripting languages, e.g. guile. Then you get the stability of the
current concept but a more comfortable language then shell-scripting.

Cheers,
Thorsten

[1] http://git.cs.fau.de/?p=hlwm;a=blob;f=MIGRATION