.TH focus-link.pl 1 .SH NAME focus-link.pl - perl FvwmCommand script .SH SYNOPSIS focus-link.pl [-v] .SH OPTION -v show version number and exit. .SH DESCRIPTION This is a user programmable window focus script. It requires FvwmCommand version 1.5 or later. FvwmCommandS must be invoked from fvwm prior to this command. This script can be invoked from a shell or from .fvwm2rc. For example. AddToFunc "InitFunction" + "I" Exec exec xcb -n 4 -l vertical -g 240x180-0+530 + "I" Exec sleep 2; $HOME/scripts/focus-link.pl Sleep is used in order to avoid un-necessary reaction during initial window creation. Note, fvwm itself continues to run during these 2 seconds. Default behavior is listed below. In order to change the behavior, modify user_function using user functions. .IP 1. When a window is opened up, focus the window and move the pointer to it. The parent window regains focus when a window is closed. Parenthood is determined when a window is opened. It is the last focused window with the same X class. .IP 2. #1 would not occur to AcroRead opening window. .IP 3. #1 would not occur when SkipMapping is set and the window is the only window of its class. .IP 4. For Netscape find dialog window, addition to #1, resize the window to 300x150 pixels and move it to East edge of the screen. Download/upload windows will not be focused nor be in focus link list. .IP 5. Move appletviewer to NorthWest corner. .IP 6. Xterm won't focus back to its parent after closed. .IP 7. When a window is de-iconified, focus it and move the pointer. .SH USER FUNCTIONS These are collection of functions a user can call from programmable section. .SS move_window [] or .SS move_window [] If is prensent in hex format, then move window. Otherwise, move the window in question. If is present, move window to in percentage of screen. If 'p' is appended to or , it specifies in pixel count. And, if or is lead with '-', it signifies that pixel count from right or bottom edge. If does not exist, must be one of North Northeast East Southeast South Southwest West Northwest to move window to edge. .SS resize_window [] Resize window to and in percentage of screen size. If is not null, resize . Otherwise resize the window in question. Letter 'p' can be appended to and to specify in pixel count. .SS focus_window [] If is not null, focus on . Otherwise, focus on the window in question. .SS warp_to_window [] [ ] Move pointer to window. If is a window id, warp to . Otherwise, warp to the window in question. If and are present, warp to and percentage of window size down and in from the upper left hand corner. Letter 'p' can be appended to and to specify in pixel count. .SS class_matches [] Check if window class and optional resource match. If arg1 is present, and if class matches with and resource matches with , then return 1. If arg1 is not present, and if class matches with then return 1. Otherwise, return null. .SS window_flag [] Return 1 if is true in the window in question. If is not null, check on . Otherwise check on the window in question. must be a exact match to one of these: StartIconic OnTop Sticky WindowListSkip SuppressIcon NoiconTitle Lenience StickyIcon CirculateSkipIcon CirculateSkip ClickToFocus SloppyFocus SkipMapping Handles Title Mapped Iconified Transient Visible IconOurs PixmapOurs ShapedIcon Maximized WmTakeFocus WmDeleteWindow IconMoved IconUnmapped MapPending HintOverride MWMButtons MWMBorders .SS resource_matches Check if window resource matches pattern . If it matches, return 1. Otherwise return null. .SS action_was Check if was taken place. must be a exact match to one of these: new page new desk add raise lower focus change destroy iconify deiconify windowshade dewindowshade end windowlist icon location end configinfo string .SS get_parent_window [] Return parent window id. If is not null, check on . Otherwise check on the window in question. .SS no_parent_window [] Return 1 if no parent window exits. If is not null, check on . Otherwise check on the window in question. .SS delete_from_list Delete the window from link list .SH SEE ALSO FvwmCommand .SH AUTHOR Toshi Isogai isogai@ucsub.colorado.edu