On 12/28/2006 21:03, Carsten Haitzler (The Rasterman) wrote:
> On Thu, 21 Dec 2006 16:01:58 -0600 Ravenlock <[EMAIL PROTECTED]> 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.
>
Thanks for considering the patch.
> 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".
I agree, that this would be beneficial. Rephorm had mentioned it as
well. I took a shot at it, and ran into some issues. The method used
to determine *which* .desktop file is appropriate (when more than one
with the same 'Exec=<app> <args>` for any <args> is present) results in
incorrect command lines. For example:
two .desktop files each with one of these Exec stmts:
Exec=aterm
Exec=aterm -title "a quick test" -sr -font 6x13 -e vi
Always picks the last (alphabetical) .desktop file. So the command line
I pick is often incorrect. I could prompt with multiple command lines
to choose from, but this seems to defeat the purpose a bit.
In short... the code to do the above exists, but is disabled pending
someone else's review (yours?). Please see comments in
_cmdln_args_get() in the patch.
Thoughts?
> 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).
>
I'll take a swing at the above.
>> --
>> Regards,
>> Ravenlock
>>
>
>
--
Regards,
Ravenlock
-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys - and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
enlightenment-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/enlightenment-devel