Re: FVWM: fvwm2rc + restart

From: Dominik Vogt <fvwm_at_fvwm.org>
Date: Wed, 3 Apr 2002 11:41:59 +0200

On Tue, Apr 02, 2002 at 03:27:13PM -0800, John Smith wrote:
> Hey, I was thinking about something as I was rewriting part of my
> configuration, and I thought it would be neat if there were an option in fvwm2
> where you can have fvwm2 automatically reload when you change the .fvwm2rc.
> If no option like that exists, what do you think about it?

You can easily do that without patching fvwm with a shell script:

-------------------------------- snip -------------------------------
#!/bin/sh

FVWMCONFIG="$HOME/.fvwm/.fvwm2rc"

# find out fvwm's process id
FVWMPID=`...`

while true; do
    # set to 1 if the file changed
    FILE_CHANGED=`...`
    if [ "$FILE_CHANGED" = 1 ]; then
        # restart fvwm
        kill -usr1 $FVWMPID
    fi
    sleep 5
done
-------------------------------- snip -------------------------------

You have to write the `...` according to what you need, though.

Bye

Dominik ^_^ ^_^

-- 
Dominik Vogt, email: d.vogt_at_lifebits.de
LifeBits Aktiengesellschaft, Albrechtstr. 9, D-72072 Tuebingen
fon: ++49 (0) 7071/7965-0, fax: ++49 (0) 7071/7965-20
--
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 Wed Apr 03 2002 - 03:42:44 BST

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