Subject: FVWM: FvwmIconMan and temporary transients

From: [email-masked]
Date: Thu, 13 Apr 2000 09:53:35 -0400 (EDT)

After seeing the message in fvwm-workers about an "icon launcher" using
FvwmButtons, I got the idea of using FvwmIconMan to put up a transient window
containing certain windows that I am interested in.

Since I don't normally use the numeric keypad on the right of my keyboard, I
have assigned certain keys to cycle between open windows of a certain type.
For instance, Keypad Enter (KP_Enter) will cycle through all my Netscape
windows.

I decided to create a similar function that is called when the Shift key is
pressed to just display a list of the windows, and allow the user to select
the desired window.  This is most useful with XTerms (as my icon title tells
me which system I'm connected to and as what user).

The problem is that it seems that there doesn't seem to be a way to clear
FvwmIconMan's concept of show/dontshow windows.  If I send FvwmIconMan a new
"show" line, it appends to its current list instead of replacing it.

Thus, I need to add a DestroyModuleConfig and reset ALL the FvwmIconMan
control lines in my function.

Is there a better way to get the functionality I need?

I've attached a minimal configuration to show what I am doing.

Second question:  is there any way to tell FvwmIconMan to pop up in the CENTER
of the screen instead of where the mouse is located?  Since I am launching
FvwmIconMan via keystroke, popping up at the mouse location isn't very useful.
Since the fvwm2 CursorMove function only moves the cursor relatively (I cannot
say "CursorMove 50 50" to place the cursor at the precise center of the
screen), it looks like absolute positioning is not available in fvwm2.  Is
this correct or is there a workaround for this?

My config file is below: 

# Styles

# All windows:

Style @@All@@		DecorateTransient, \
			MWMDecor, \
			RandomPlacement, \
			SmartPlacement, \
			NoIcon

# No decorations

Style @@Empty@@		UseStyle @@All@@, \
			BorderWidth 0, \
			CirculateSkip, \
			CirculateSkipIcon, \
			HandleWidth 0, \
			NoHandles, \
			NoTitle, \
			WindowListSkip

# System Windows (Sticky)

Style @@SysStick@@	UseStyle @@Empty@@, \
			Sticky

# FvwmIconMan -- System (Sticky) + Title

Style "FvwmIconMan"	UseStyle @@SysStick@@, Title

# TransientMan function:

DestroyFunc	"TransientMan"
AddToFunc	"TransientMan" \
  "I"	DestroyModuleConfig FvwmIconMan*
+ "I"	*FvwmIconMan*transient*title $0
+ "I"	*FvwmIconMan*transient*show
+ "I"	*FvwmIconMan*transient*show $1 $2 $3 $4 $5 $6 $7 $8 $9
+ "I"	*FvwmIconMan*transient*resolution	global
+ "I"	*FvwmIconMan*transient*font		7x13bold
+ "I"	*FvwmIconMan*transient*drawicons	always
+ "I"	*FvwmIconMan*transient*followfocus	true
+ "I"	*FvwmIconMan*transient*usewinlist	true
+ "I"	*FvwmIconMan*transient*format		%t
+ "I"	*FvwmIconMan*transient*focusbutton	down black grey
+ "I"	*FvwmIconMan*transient*focusandselectbutton flat black grey
+ "I"	*FvwmIconMan*transient*iconbutton	up grey40 grey
+ "I"	*FvwmIconMan*transient*buttongeometry	200x0
+ "I"	*FvwmIconMan*transient*managergeometry	1x0
+ "I"	*FvwmIconMan*transient*action	Key Up     N gotobutton Up, select
+ "I"	*FvwmIconMAn*transient*action	Key Down   N \
	bif Next 3, gotobutton 0, select, ret, gotobutton Next, select
+ "I"	*FvwmIconMan*transient*action	Key Escape N quit
+ "I"	*FvwmIconMan*transient*action	Key q      N quit
+ "I"	*FvwmIconMan*transient*action   Mouse 0    N sendcommand Focus-and-Warp
+ "I"	Module FvwmIconMan Transient

# Other useful functions called in this file:

DestroyFunc	"warp-to"
AddToFunc	"warp-to" \
  "I"	Next [$0] Focus-and-Warp

DestroyFunc	"Focus-and-Warp"
AddToFunc	"Focus-and-Warp" \
  "I"	Iconify -1
+ "I"	Raise
+ "I"	Focus
+ "I"	WarpToWindow	50 50

# Keypad keys to launch TransientMan:

Key KP_Enter	A	N	warp-to "Netscape"
Key KP_Add	A	N	warp-to "TkRat"
Key KP_Subtract	A	N	warp-to "XVile"
Key KP_Multiply	A	N	warp-to "*Term"
Key Num_Lock	A	N	warp-to "Knews"

Key KP_Enter	A	S	TransientMan Browsers  class=Netscape
Key KP_Add	A	S	TransientMan Mailers   class=TkRat
Key KP_Subtract	A	S	TransientMan Editors   class=XVile
Key KP_Multiply	A	S	TransientMan Terminals class=*Term
Key Num_Lock	A	S	TransientMan News      class=Knews

# end of configuration

-- 
Larry Gensch                                          [email-masked]

                  "May I have ten thousand marbles, please?"

--
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: Dominik Vogt <[email-masked]>
Date: Fri, 14 Apr 2000 09:28:24 +0200

> FvwmIconMan via keystroke, popping up at the mouse location isn't very useful.

I don't think it's possible (of course you can use FvwmEvent).

> this correct or is there a workaround for this?

Can you type two enhancement request for this in Jitterbug?

Bye

Dominik ^_^

-- 
Dominik Vogt, Agilent Technologies, Dept. BVS
Herrenberger Str.130, 71034 Boeblingen, Germany
phone: 07031/464-4596, fax: 07031/464-3883, [email-masked]
--
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].