Re: Thinking about the tasklist

On Wed, 20 Oct 2004 16:15:12 +0200, Jan Nieuwenhuizen <janneke gnu org> wrote:

> It's a too well kept secret how to bind keys to something more useful
> than an external command and extend window manager functionality.

No it's not.  You either bind a key to an external command via
gconf[1], or you modify Metacity itself if you don't want to run an
external command.  Why can't you just use an external command, as Rob
previously suggested?  (I believe you mentioned that your app took a
long time to start--but why not have that app just always be running
in the background, and have another app which launches quickly be
bound to the keybinding and forward the message to your real app?)

> For example, how would you translate these elementary custom sawfish
> window nav commands to Metacity
>   (bind-keys window-keymap "KP_Add" 'maximize-window-vertically-toggle)
>   (defun windows-of-name (name)
>     (filter (lambda (w) (string-match name (window-name w))) (managed-windows)))
>   (bind-keys global-keymap "M-TAB" '(focus-window (car (windows-of-name "keywise"))))

If Metacity wanted infinite configurability such as Sawfish was
designed for, Metacity wouldn't have been written--Sawfish was already
available.  (In other words, you can't do this in Metacity.  By

> Guile bindings for GNOME 2.8, including my libwnck wrapper, are
> currently in prerelease, and IWBN if we could use that to extend
> Metacity in a practical way, and ship an example for people to use.

Perhaps if you could explain why binding a key to run your command
isn't sufficient, we could try to help more.


[1] Just to make sure we're on the same page about binding keys to run
a command, the way I would do it is like this (only as an
example--note that this is actually a dumb example because there's now
an /apps/metacity/global_keybindings/run_command_terminal key):

gconftool-2 --set /apps/metacity/keybinding_commands/command_1 --type
string "/opt/gnome2/bin/gnome-terminal"
gconftool-2 --set /apps/metacity/global_keybindings/run_command_1
--type string "<Ctrl><Alt><Shift>t"

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