Subject: FVWM: defining variables for fvwm and conditional statements

From: Rick Jones <[email-masked]>
Date: Tue, 19 Nov 2002 15:30:02 -0500 (EST)

I've been looking through the fvwm documentation and
have had difficulty finding this issue.  For example,
I would like fvwm to change the menus and environment
based on time of day and other input.. 

How would I implement this.. ??

Rick

______________________________________________________________________ 
Post your free ad now! http://personals.yahoo.ca
--
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 [email-masked].
To report problems, send mail to [email-masked].

---

From: Cameron Simpson <[email-masked]>
Date: Wed, 20 Nov 2002 18:37:24 +1100

On 15:30 19 Nov 2002, Rick Jones <[email-masked]> wrote:
| I've been looking through the fvwm documentation and
| have had difficulty finding this issue.  For example,
| I would like fvwm to change the menus and environment
| based on time of day and other input.. 
| How would I implement this.. ??

The usual approach is to generate the menus on the fly with PipeRead,
and put the smarts in the shell (or perl or ...) script that emits the
menu contents.

The FVWM config file doesn't really have a conditional syntqax - the closest
it comes is the flags for window selection (CurrentDesk, etc).
-- 
Cameron Simpson, DoD#743        [email-masked]    http://www.zip.com.au/~cs/

Son, all the beautiful, intelligent, healthy young women are taken. It's a
basic law of the universe, and if you don't like it, go somewhere else.
                                  -- Ken Johnson's dad, 1906-1992
--
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 [email-masked].
To report problems, send mail to [email-masked].

---

From: Mikhael Goikhman <[email-masked]>
Date: Wed, 20 Nov 2002 11:49:26 +0000

> How would I implement this.. ??

What you want is scheduling events, not conditional statements.

You may add this command to your .fvwm2rc:

  AddToFunc StartFunction I Module FvwmCommandS

Then setup crontab to run FvwmCommand with any commands at any day time
you want. This is mostly a unix problem, not FVWM's. Although developement
versions do have a new command Schedule that may or may not help you.
It is more intended for short delays (several seconds), not several hours.

Regards,
Mikhael.

---

From: Rick Jones <[email-masked]>
Date: Wed, 20 Nov 2002 18:00:18 -0500 (EST)

My appologies Mikhael.. I forgot to send a cc to
[email-masked] .. so you have an earlier email
responding to this in your migo account.

FvwmCommand sounds perfect.. I'm assuming any command
or system call from a program will pass the command to
fvwm.  Is there a way to restart fvwm and specify
different fvwm config file.. or will I have to have
the program copy the desirable config to .fvwm2rc
before telling fvwm to restart?

Rick

 --- Mikhael Goikhman <[email-masked]> wrote: > On

---

From: Mikhael Goikhman <[email-masked]>
Date: Thu, 21 Nov 2002 02:55:06 +0000

> before telling fvwm to restart?

Just execute this commands in one or another way (from keyboard/mouse/menu
binding, from FvwmConsole or FvwmCommand):

  Restart fvwm -f another-rc-file   # put another-rc-file to ~/.fvwm/

Or if you want to keep exactly the same command line arguments as the
currently running executable, just:

  Restart

Regards,
Mikhael.