Re: FVWM: fvwm2rc + restart

From: Uwe Pross <uwe.pross_at_e-technik.tu-chemnitz.de>
Date: Wed, 3 Apr 2002 12:58:32 +0200

On Wed, Apr 03, 2002 at 09:58:30AM +0200, Uwe Pross wrote:
>
> How about adapting an editor for example (x)emacs that it restarts
> fvwm2 after saving the file .fvwm2rc. In emacs there is a hook called
> after-save-hook. It contains names of functions which will be executed
> after a buffer has been saved. One could write a short lisp function
> which checks the buffer name and executes "FvwmCommand 'Restart'" if
> buffer name is .fvwm2rc.

With the message from Dominik the following lisp statement restarts
fvwm after .fvwm2rc has been saved:

(add-hook 'after-write-file-hooks
          '(lambda ()
             "restarts fvwm2 if the buffer .fvwm2rc has been saved"
             (interactive)
             (if (string-equal (buffer-name) ".fvwm2rc")
                 (progn
                   (message "Restarting fvwm2 ...")
                   (shell-command "kill -USR1 `ps -u $USER | grep fvwm2 | awk '{ print $1 }'`" )))))


Uwe
-- 
+--------------------------------------------------
| Uwe Pross 
| mail : mailto:uwe.pross_at_e-technik.tu-chemnitz.de
| www  : http://www.tu-chemnitz.de/~uwp
+--------------------------------------------------
--
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 - 04:59:00 BST

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