FVWM: FvwmCommand 1.5 and focus-link

From: Toshi Isogai <isogai_at_ucsub.Colorado.EDU>
Date: Thu, 14 May 1998 23:05:09 -0600 (MDT)

FvwmCommand 1.5 is released.

FvwmCommand lets you monitor fvwm2 transaction and issue
fvwm2 command from a shell.

It can be found at:
  www.concentric.net/~Isogai/fvwm2/fvwm2.shtml

Changes on ver. 1.5 is :
  Fixed bugs in reading and writing FIFOs.

  Will not exit after bad messages.

  Server keeps track of connection to client to avoid sending
  unnecessary messages.

  Handle multiple (long) commands correctly.

  Added lock mechanism to avoid connecting multiple FvwmCommand
  to a FIFO.

  Added focus-link.pl script and its manpage.


The last item, focus-link, needs some explanation. It is a user
programmable window focus script. Here is its default behavior.

       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.

       2. #1 would not occur to AcroRead opening window.

       3. #1 would not occur when SkipMapping is set and the
              window is the only window of its class.

       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.

       5. Move appletviewer to NorthWest corner.

       6. Xterm won't focus back to its parent after closed.

       7. When a window is de-iconified, focus it and move
              the pointer.

If all you want is to achive #1, all you need in user_function is :

sub user_function {
  if (action_was ("add")) {
    focus_window();
    warp_to_window (50, 50); # center of the window
  }elsif (action_was("destroy")) {
    focus_window (get_parent_window());
  }
}
  
To add #3, add following before "focus-window" in "add" block.

  if (window_flag('SkipMapping') && no_parent_window()) {
      return();
  }



The house keeping in this script is done in other functions and
the configurable section is faily easy and short.



Enjoy.

----------------------------------------------------------
Toshi Isogai isogai_at_ucsub.Colorado.EDU



--
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 majordomo_at_hpc.uh.edu.
To report problems, send mail to fvwm-owner_at_hpc.uh.edu.
Received on Fri May 15 1998 - 00:06:45 BST

This archive was generated by hypermail 2.3.0 : Mon Aug 29 2016 - 19:38:01 BST