Re: FVWM: conditional functios

From: Michael Tiefenback <tiefen_at_mgt.jlab.org>
Date: Sun, 17 Aug 1997 14:43:20 -0400 (EDT)

On Sun, 17 Aug 1997, Linux-Debian Team wrote:

> Subject: FVWM: conditional functios
>
> I am used to open a note pad from time to time, anywhere in my
> workplace. My note pad is a plain text file edited through vi in
> xterm and i can pop it up either by key composition or selecting
> a menu item in fvwm2 root context.
> Often it happens i try to open my notes file twice simultaneously,
> having forgotten a vi session is already active on another desktop
> of my workplace.
> Here my question follows: is there a viable solution in order to
> avoid opening twice the sape file?

I have seen examples posted to this list of fvwm2 functions referencing
the existence of a window of a particular name, popping it up and warping
to it if it exists. If it does not exist, then create it in the usual
way. I think the primary objects of interest were web browsers and mail
clients. I use my FvwmPager with color- and name-coding to serve this
function. I will try to find any references to this mechanism that I may
have archived.

>
> A further question comes to my mind:
> May it be possible to apply a condition to the execution of a command
> in fvwm2 ? In affirmative case, the window manager could be asked
> to execute a script file; then, depending on the result, to start
> one function or another. In the present case, the script would
> check whether the requested (my notes) file is already open.

Others have responded already to this. As mentioned, lock files are
reasonable as a mechanism. But they are not as reliable as the window
existence unless the lock file contains a PID number which can be polled
by ps for its current existence. I use this mechanism for certain
controls processes here at work, so that stale lock files can be
automatically cleared.

Michael Tiefenback

--
Visit the official FVWM web page at <URL:http://www.hpc.uh.edu/fvwm/>.
To unsubscribe from the list, send "unsubscribe fvwm" in the body of a
message to majordomo_at_hpc.uh.edu.
To report problems, send mail to fvwm-owner_at_hpc.uh.edu.
Received on Sun Aug 17 1997 - 13:37:10 BST

This archive was generated by hypermail 2.3.0 : Mon Aug 29 2016 - 19:38:00 BST