Subject: FVWM: FvwmScript Window Properties

From: Nicholas Harknett <[email-masked]>
Date: Fri, 27 Aug 2004 11:36:14 -0400

Hello,
  Does anybody know how I can do the following?  In an FvwmScript, which
I have already wrote, I want create an if statement to check the status
of a window.  For example, I would like to check whether it is iconified, focused, brought forward (etc.)  I know how to use these properties as 
conditions in an All command or the likes, but I was wondering how to 
refer to these properties and how to compare them to a window name, in an FvwmScript.
  The reason I am trying to do this, is I would like, when I click on a 
button, I would like to check the status of a window with a certain name,
and then if it is iconified, I would like to DeIconify it and fbring it 
forward and focus it.  If it does not exist, run a command, and if it does
exist and is not iconified, iconify it.  
  I hope somebody can just help me to get started with a conditional check
on the status, as I belive I can do the rest with little to no trouble.

	Cheers,
	  Nick Harknett

--
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 [email-masked].
To report problems, send mail to [email-masked].

---

From: Mikhael Goikhman <[email-masked]>
Date: Sat, 28 Aug 2004 20:23:14 +0000

> on the status, as I belive I can do the rest with little to no trouble.

If I understand you correctly, this has nothing to do with FvwmScript.
Create a function or several sub-functions (if needed) to do the work.
Then bind it to a titlebar button, or maybe FvwmScript/FvwmForm action.

The function may do something like this in 2.5.x:

  + I Next (Mozilla) Nop
  + I TestRc (!Match) Exec mozilla
  + I TestRc (Match) ThisWindow (Iconified) Iconify off
  + I TestRc (!Match) Iconify on

Or any other if-else construction. You get the idea.

Regards,
Mikhael.

---

From: jpkotta <[email-masked]>
Date: Tue, 31 Aug 2004 19:45:12 -0500

I have a mouse binding for closing windows,
	Mouse 1 4M Close
I would like to be able to close windows by clicking on the corresponding 
button in IconMan, so I did this:
	Style "FvwmIconMan" !Closable
	*FvwmIconMan: *action	Mouse	1	4M	sendcommand Close
It seems like when I click on a button with this binding, fvwm just sends 
it to IconMan, not the button.  Before I put the !Closable in, IconMan 
would close.  This binding works fine, because it's not defined anywhere 
else:
	*FvwmIconMan: *action	Mouse	3	4M	sendcommand Close

However, I would like to have only Mouse 1 4M close windows.  Is there a 
way to get around this?

Thanks,
jpkotta