FVWM: A gentle pointer... (FvwmForm)

From: Len Philpot <len_at_philpot.org>
Date: Thu, 26 Sep 2002 20:12:30 -0500

Can someone point me in the right direction?

I have the following simple FvwmForm definition :

*RunCommandTitle "Run a command"
*RunCommandFore black
*RunCommandBack grey70
*RunCommandFont *helvetica*b*r*n*14*
*RunCommandFore navy
*RunCommandLine center
*RunCommandFont *helvetica*b*r*n*12*
*RunCommandButtonFont *helvetica*b*r*n*12*
*RunCommandInputFont -sun-screen-medium-r-*-*-12-*-*-*-*-*-*-*
# items
*RunCommandText "Command line"
*RunCommandInput cmd 40 ""
*RunCommandLine right
*RunCommandItemFore darkred
*RunCommandButton quit " OK " ^M
*RunCommandCommand exec exec $(cmd)
#*RunCommandCommand RunCmd $(cmd)
*RunCommandItemFore black
*RunCommandButton quit " Cancel " ^[
*RunCommandCommand nop

This works fine, but I'd like to add a "last command" button to the
form. Adding the additional button is easy, but I'm stumped on how to :

1. Save $(cmd) between invocation
2. Load cmd with $(lastcmd) (or whatever) with a button press

Ideally, I'd like to be able to visually see the last command line
reloaded into the cmd text field, then just click OK to run it. An
alternate solution (though less ideal to me) would be to simply run the
last $(cmd) when the last button was clicked.

I can substitute the direct exec on the run button with the following
rather obvious function (commented above), but I'd like to also have it
save the command line :

AddToFunc RunCmd
+ "C" exec exec $0

If anyone can point me in the right direction, I'd appreciate it.

Thanks.

-- 
+-----------------------------------------------------+
|  Len Philpot       ><>         http://philpot.org/  |
|  len_at_philpot.org     len_philpot_at_hotmail.com (alt)  |
+-----------------------------------------------------+
--
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 Thu Sep 26 2002 - 20:14:00 BST

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