Re: FVWM: feature request: toggle command

From: Tim Phipps <tim_at_quadrics.com>
Date: Mon, 07 Dec 1998 15:30:53 +0000

Neil Zanella wrote:

> Feature request for Fvwm2:
>
> Toggle command1 command2
> Executes command1 when invoked, then command2 when invoked the next time,
> then command1 when invked the next time and so on...
> Commands containing spaces must be quoted.

Are you sure you want this? What would happen with

Toggle "Exec oclock" "Exec xclock"
Toggle "Exec xterm" "Exec rxvt"
Toggle "Exec oclock" "Exec xclock"

What I mean is: do you want Toggle to look at its arguments and compare them with the
previous ones or do you just want to execute Toggle and have one of two predefined
commands happen? If the latter then try:

DestroyFunc Toggle1
AddToFunc Toggle1 "I" DestroyFunc Toggle
+ "I" AddToFunc Toggle "I" command1
+ "I" AddToFunc Toggle "I" Toggle2
DestroyFunc Toggle2
AddToFunc Toggle2 "I" DestroyFunc Toggle
+ "I" AddToFunc Toggle "I" command2
+ "I" AddToFunc Toggle "I" Toggle1
Toggle

Cheers,
Tim.


--
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 Mon Dec 07 1998 - 09:31:42 GMT

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