Setting up windows on login

DanKarron at UCBVAX.BERKELEY.EDU DanKarron at UCBVAX.BERKELEY.EDU
Thu May 2 14:03:58 AEST 1991


>There's a related question:  Once you've layed (lied?) out your
>windows, it would be nice to save the layout (e.g. sizes, positions,
>fonts) in a way that could be used again upon startup.  Something like
>"tooplaces > ~/.suntools" on a Sun before X.  With X, at least you
>have "xwininfo" which gives you position info, which you can then
>transcribe to the appropriate startup file.  NeWS on the IRIS has no
>such analog that I know of.  (I've asked about this before on
>comp.sys.sgi.)  There's no way to get position info from a window that
>you've moved by hand with the mouse.  I find this a serious
>shortcoming, making customization painful. (Until it's finally right!)
>
>|============================================================================|
>| Internet:  browning at nas.nasa.gov                  Phone:  (415) 604-4321   |
>| UUCP:  {hplabs, mailrus, ucbvax, etc.}!ames!amelia!browning                |
>|----------------------------------------------------------------------------|
>|"the nice thing about true hopelessness is that you don't have to try again"|
>| -- jules shear                                                             |
>|============================================================================|

Till X is here and now, I have some hacks for the 4sight window manager
I call 'Stickey Windows'. Essentially, the idea is that every window 
attempts to read its place from a settings file, and when you exit or kill
a window, it will save its place in a settings file. The settings file
are the window title name , e.g., winopen("bingo") preappended with a .W
".Wbingo".

I use this with multi threaded graphics applications with lots of mains and
windows. Once you lay out your screen the way you like, every time you startup
you application the windows open up where you want them to.

The code uses macros to replace the gl calls with private calls that
intercept window manager calls and keeps a linked list of window properties.

I find it really useful for such a simple idea, and think that it should
be made an optional part of the gl source. I disable/enable this feature with
an environment var "SAVE_WINDOW_LAYOUT". The source is on my anon ftp as
StickeyWindows.tar.Z.

Sorry, this works only for source code ! 


Cheers!

dan.
| karron at nyu.edu (e-mail alias )         Dan Karron, Research Associate      |
| Phone: 212 263 5210 Fax: 212 263 7190  New York University Medical Center  |
| 560 First Avenue                       Digital Pager <1> (212) 397 9330    |
| New York, New York 10016               <2> 10896   <3> <your-number-here>  |



More information about the Comp.sys.sgi mailing list