On Mon, Feb 10, 2003 at 09:16:18AM -0500, Maciej Kalisiak wrote:
> On Wed, Jan 29, 2003 at 04:38:16PM -0500, Mikhael Goikhman wrote:
> > Do something like this:
> >
> > DestroyFunc SelectWindow
> > AddToFunc SelectWindow
> > + I Focus
> > + I Raise
> > + I WarpToWindow 50 50
> >
> > Key 1 W SCM Key 1 A SM Silent WindowId $$w SelectWindow
> > Key 2 W SCM Key 2 A SM Silent WindowId $$w SelectWindow
> > Key 3 W SCM Key 3 A SM Silent WindowId $$w SelectWindow
> > Key 4 W SCM Key 4 A SM Silent WindowId $$w SelectWindow
> >
> > Then press Shift-Ctrl-Alt-1 / 2 / 3 / 4 to bookmark windows (up to 4)
> > and Shift-Alt-1 / 2 / 3 / 4 to switch to the bookmarked windows.
>
> Is there any way to make/fake a given keybinding apply to in a given desktop?
> For example, I would like Shift-Alt-1 to take me to one window on desktop 1,
> when I'm in desktop 1, while in desktop 2 I want that same key combo to take me
> to another window (which is on desktop 2). The basic idea I'm shooting for
> here is that each desktop is dedicated to some particular task I'm working on,
> and the windows particular to that task are easily accessed using numeric
> bookmarks such as above, with the bookmarks being different for each
> task/desktop. Thus during work I could use one of the Desktop selection
> keybindings first to hop to the right task, and then use a second, "memorized"
> combo to get me to a desired window for the task.
You can set up FvwmEvent to call a shell script via PipeRead when
the active desk is changed. I can't try it out right now, but you
have to do something like this:
*FvwmEvent: new_desk PipeRead my_shell_script $d
And the shell script:
#!/bin/sh
# remove previous bindings
echo Key 1 W SM -
if [ "$1" = 1 ]; then
echo Key 1 W SM "do this"
else
echo Key 1 W SM "do that"
fi
You may have to use $$d or $$$d or ... instead of $d and may have
to quote some parts in the shell script or the *FvwmEvent: line.
Bye
Dominik ^_^ ^_^
--
Visit the official FVWM web page at <URL: http://www.fvwm.org/>.
To unsubscribe from the list, send "unsubscribe fvwm" in the body of a
message to majordomo_at_fvwm.org.
To report problems, send mail to fvwm-owner_at_fvwm.org.
Received on Mon Feb 17 2003 - 04:26:08 GMT