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

Re: Shortcuts patch (was Re: Path to 0.92.1)

On Wed  5.Nov'08 at 17:42:16 -0200, Renato Botelho wrote:
> On Wed, Nov 5, 2008 at 5:12 PM, Carlos R. Mafra <crmafra2@gmail.com> wrote:
> >
> >> > BTW, I added an extra-patch in FreeBSD ports some time ago, actually,
> >> > I took it from fedora rpms, but it's a great new feature, IMHO, could you
> >> > take a look and consider (or not) including this into src?
> >> >
> >> > http://www.freebsd.org/cgi/cvsweb.cgi/ports/x11-wm/windowmaker/files/extra_dockhotkeys.patch?rev=1.1;content-type=text%2Fx-cvsweb-markup
> >> >
> >> > The objective of this patch is to allow you define keyboard shortcut
> >> > to a dock, it's usefull since sometimes you don't add a program in
> >> > menu, just a dock on cliping or docker, and add a shortcut for it
> >> > is great.
> >>
> >> What did you think about this patch?
> >
> > Hm, how does it work?
> >
> > Suppose I want to have shortcuts to some applications (e.g., call
> > 'amixer set Master 10+%' by pressing some multimedia key).
> > What should I do if I am going to use your patch?
> >
> > I could try to guess by reading the diff, but it is easier to ask the
> > intentions first and see the code later :-)
> It won't help you in this case, with this patch, when you
> add a dock on docker or on clipping, you can click on it
> with right button, go to Settings, and near Icon Image you
> will have an option to add a shortcut.

Hm, I compiled your patch but I see no option to add the shortcut.
Do I have to enable something? In the patch description from the
link above you say it is off by default, but I can't see where
I can turn in on.

> The only difference is you don't need to add on menu the
> same item you have docked just to use a shortcut.

Hm, that is not what I want indeed.

Ideally I would like to have a configuration file inside ~/GNUstep 
which would accept something like this

<keyboard-shortcut>  "command to execute"

so there would be no need to clutter the menu or the dock.
I think you are pretty close to achieve this if you modify
your patch a bit. Can you try it? :-)

I tried to do it on Saturday, but I am still far from
knowing the functions which allow wmaker to know when
somebody pressed the shortcuts.

At first I thought that the only place where wmaker 
had the knowledge of shortcuts was the one
which WPref uses to define the standard shortcuts
(F11 for the window list etc). 

So I thought about adding more entries to that list 
and modify them to be able to call some application 
instead of doing some internal wmaker stuff like
minimizing a window or something.

But I did not like that solution because it would
mix "internal" wmaker with a list of "Increase
Volume", "Decrease backlight", "Mute sound" etc.
They clearly have nothing to do with each other!

So after a while I noticed that I could workaround
my need by adding menu entries, but after a while
the menu was ugly as hell and I had to hide all
the commands inside one submenu. 

That is not bad right now, but it can be much better.
Furthermore, as I always generate the menu automatically
with a script called genmenu.sh now I have to
waste time to add the menu items with the shortcuts 
manually each time I run genmenu.sh.

Oh well...

To unsubscribe, send mail to wmaker-dev-unsubscribe@lists.windowmaker.info.