I think users could do some very interesting things with dynamics
menus. What I mean by a "dynamic menu" is a script that is in
the ~/.e16/menus directory. It can be linked to just like all
the other menus but when it is selected, the program is run and
the std output of the program forms the menu. This is a direct
analogy to CGI scripts on the web. The current menus are like
static pages and the dynamic menus would be like CGI scripts.
This might be very easy to implement. It opens the door to users
expanding e16 with scripts. For example, someone on the e16
discussion forum asked for a modified version of the Window List
(that you get to by doing a middle click on the drag bar).
Currently, adding this would require writing a lot of C code. But
it would be trivial to write a menu script that implemented this
feature. Users could then have whatever kind of window lists
they wanted, sorted and grouped however they want.
There are three refinements to this idea. Two of them are
essential IMO and the other is a nicety.
The first essential refinement is to have e16 pass the current
window list to the scripts. Probably the output of "eesh wl
prop" would be best. The reason I think this is essential is
because I think e16 will lock up if one of the menu scripts tries
to call eesh. If lockup is not an issues then there is no need
for this feature. Probably the best way to pass this information
to the scripts is via an environment variable in analogy to how
information is passed to CGI scripts. If that is difficult to
implement, I'm sure there are other ways. I *think* getting the
windows list is the only eesh function the menu scripts need.
The programs the menus call may need to call eesh to do other
things but this works already. It is likely that other
environment variables may need to be added.
The second essential refinement would be the ability to pass
parameters to the scripts as in:
"List Windows by Desktop" NULL menu "window-list.pl by_desktop"
In this example window-list.pl is sent the parameter "by_desktop".
The simplest thing might be to pass the arguments as command line
parameters, but if this is difficult, environment variables could be
used. This mechanism would allow one menu script to pass
information on to sub-menu scripts. For example, a sub-menu
might let the user, do various things to a window, like move it,
or close it, or bring it to the top or bottom of the stack, etc.
The nicety would be to let menu items have a right click action
as well as a left click action. This might be of some use in
static menus as well.
I realize this is kind of a crazy idea. I'm not holding my
breath waiting for it to be implemented. I can understand
why people dealing with the code base might prefer to keep
this potential can of worms, unopened and locked away in a
closet.
Peace, James
Reality is merely an illusion, albeit a very persistent one.
-- Albert Einstein
------------------------------------------------------------------------------
Sell apps to millions through the Intel(R) Atom(Tm) Developer Program
Be part of this innovative community and reach millions of netbook users
worldwide. Take advantage of special opportunities to increase revenue and
speed time-to-market. Join now, and jumpstart your future.
http://p.sf.net/sfu/intel-atom-d2d
_______________________________________________
enlightenment-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/enlightenment-users