Subject: FVWM: Functions and buttons...

From: Nick Cross <[email-masked]>
Date: Wed, 09 Oct 1996 10:17:31 +0100

Hi,

Right, though I am at the moment using fvwm95 and the taskbar I *think*
this will be applicable to the buttonbar. Anyway...

what I want to do is to define a command so that:

double click on a button :  IF netscape mail is running deiconify it, if
iconified, raise and focus to it
ELSE load up netscape mail and focus to it.

I want this to be able to be bound to either a button in goodstuff (is
that right?, I can't remember) or the mail icon in the taskbar.

Okay thanks for your help,
Nick
--
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 [email-masked].
To report problems, send mail to [email-masked].

---

From: lar3ry gensch <[email-masked]>
Date: Wed, 09 Oct 1996 10:19:31 -0400

> this will be applicable to the buttonbar. Anyway...

This is a typical fvwm question... it's valid.  [smile]

> ELSE load up netscape mail and focus to it.

I use the following extensively in my fvwmrc file:

AddToFunc	"warp-or-run"
+	"I"	Next [$0] Iconify -1
+	"I"	Next [$0] Focus
+	"I"	None [$0] $1 $2 $3 $4 $5 $6 $7 $8 $9

The first argument ($0) is the name of the window to search for.  The
next arguments (up to 9) are the 'Exec' command to run if the window
isn't found.

Using the new FvwmButons module, you can call it as such:

*FvwmButtons(Icon mini-filemgr.xpm, Action 'warp-or-run "moxfm*" Exec
moxfm')

-- 
------------------ http://www.tiac.net/users/lar3ry/ -------------------
(void) lar3ry();                                      [email-masked]

  "I'll only enjoy being a manager when they port gdb to debug humans"

---

From: [email-masked] (Albrecht Kadlec)
Date: Mon, 14 Oct 96 21:36:41 +0200

>>>>> lar3ry gensch writes:

> this will be applicable to the buttonbar. Anyway...

l> This is a typical fvwm question... it's valid.  [smile]

> ELSE load up netscape mail and focus to it.

l> I use the following extensively in my fvwmrc file:

l> AddToFunc	"warp-or-run"
l> +	"I"	Next [$0] Iconify -1
l> +	"I"	Next [$0] Focus
l> +	"I"	None [$0] $1 $2 $3 $4 $5 $6 $7 $8 $9

you have to use "Immediate" or "Motion" (after a timeout) for single click
buttons and "Click" for DoubleClick buttons, since FvwmButtons consumed the
first click before calling the function.

l> The first argument ($0) is the name of the window to search for.  The
l> next arguments (up to 9) are the 'Exec' command to run if the window
l> isn't found.

l> Using the new FvwmButons module, you can call it as such:

l> *FvwmButtons(Icon mini-filemgr.xpm, Action 'warp-or-run "moxfm*" Exec
l> moxfm')

albrecht
-- 
Brezhnev took Afghanistan,	|  And Maggie over lunch one day,
Begin took Beirut,		|  Took a cruiser with all hands,
Galtieri took the Union Jack	|  Apparently to make him give it back
			-- Pink Floyd, "Get Your Filthy Hands Off My Desert"
--
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 [email-masked].
To report problems, send mail to [email-masked].