Re: FVWM: On the process hosted in its window

From: Mikhael Goikhman <migo_at_cortext.co.il>
Date: Fri, 1 Sep 2000 02:26:45 +0200

On 28 Aug 2000 14:52:13 +0200, Paolo Pumilia wrote:
>
> I am using fvwm 2.3.20
> Is it possible to pass to fvwm the command line used to start the
> process hosted in each window?

No, this is not possible with fvwm as of now.

> I would like to bind a window button to different actions, depending on the
> process being displayed
> E.g. if the the file fname has been opened by the command 'gvim fname'
> one of the window buttons on the title bar will open my tricks&tips
> notes about gvim and another one will open my notes about the
> contents of fname.
>
> How can i do?

This can be done using a window name.
Fortunately for you, gvim sets its name to "VIM - fname"

So, this should do the work (Ctrl-Mouse3 on the titlebar button 1 here):

  Mouse 3 1 C MyGvimExclusiveAction

  AddToFunc MyGvimExclusiveAction
  + WindowId $w ("VIM - fname.txt") Exec exec open-my-notes-about fname.txt
or:
  + WindowId $w ("VIM - *") Exec exec open-my-notes-about "$n"

where open-my-notes-about is your shell script, which gets the file name
or the gvim title (it should parse it, s/^VIM - //, to get the file name).

I hope, you get an idea.

If you want to have different number of titlebar buttons, you should use
FvwmEvent (see archives how) to catch VIM window and bind more buttons.

Regards,
Mikhael.
--
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 Thu Aug 31 2000 - 19:27:09 BST

This archive was generated by hypermail 2.3.0 : Mon Aug 29 2016 - 19:37:51 BST