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

Re: [E-devel] Add application key bindings from border menu....



On Thu, 21 Dec 2006 16:01:58 -0600 Ravenlock <ravenlock@comcast.net> babbled:

> Hello,
> 
> Here is a patch that will add a border menu item that allows you to
> enter a key binding for the current app.
> 
> It utilizes the existing key binding config dialog.  When launched from
> the border menu, it will immediately prompt for the binding.  It then
> selects the "Defined Command" as an action, and fills in the "Action
> Params" with the present app's command line args.
> 
> Quirks/Limitations:
>    Well, in short... the command line and args may not be exactly what 
> you expect.  For example, some apps are started via shell scripts. 
> Firefox and Thunderbird for example.  If you start them up and create a 
> key binding in this fashion, you get firefox-bin and thunderbird bin 
> respectively.  This will not launch those apps (on my machine anyway).
>    Additionally, complex command lines may not be as you expect either. 
>   Command lines with pipes and `command substitutions` in particular.
> 
> Comments welcome.

cool idea - before accepting - here's an idea for an improvement.

if the border has a bd->app (ie an e_app has been matched to the border
somehow) use the bd->app->exe (ie the execute line in the matched app) instead
of the icccm command by default. this should fix some of what you mention
above as "gotchas". also it'd be nice if instead of the whole keybindings
config dialog to come up - it

1. had a different dialog that displayed the command-line (and if any app was
matched and the icon if anything was matched - like the bd->app or if the icccm
command matches an app like e_exebuf matches them, also display the app icon
from this app so you know it has been matched), and also display the actual
command in an edit box.
2. now ask for the key combo to be pressed.
3. if the key combo conflicts pop up a list of existing bound key combos in a
dialog and ask again for a key combo (keep asking until they abort with escape).
4. then just add the binding and close dialog(s) (just keeps the big dialog from
popping up when you don't need most of its features).

> -- 
> Regards,
>    Ravenlock
> 


-- 
------------- Codito, ergo sum - "I code, therefore I am" --------------
The Rasterman (Carsten Haitzler)    raster@rasterman.com
裸好多
Tokyo, Japan (東京 日本)