Path: utzoo!attcan!uunet!sdrc!evgabb From: evgabb@sdrc.UUCP (Rob Gabbard) Newsgroups: comp.sys.hp Subject: Re: standards for windowing software? Message-ID: <184@sdrc.UUCP> Date: 22 Oct 90 14:02:38 GMT References: <1990Oct22.012158.13288@cs.dal.ca> Distribution: na Organization: SDRC, Cincinnati Lines: 31 From article <1990Oct22.012158.13288@cs.dal.ca>, by silvert@cs.dal.ca (Bill Silvert): > What I want to do (and what most systems support) is that I open a > window WITHOUT carefully counting the lines and columns, invoke vi or > more, and and it finds out what the window size is and uses that. The resize program supplied with HP-UX is intended to allow you to do that. It queries via curses the current width and height of the window and outputs the following lines (appropriate for use in eval): LINES=xx; COLUMNS=yy; export LINES COLUMNS; where xx and yy equal the number of lines and colummns respectively in the pseudo terminal. Thus, after resizing your window you could execute the following (assuming /usr/bin/X11 is in your path): eval `resize` I set up the following Korn Shell alias for vi so I don't have to worry about doing this every time I resize my window. You could do the same for more if it queries LINES and COLUMNS. You could also do this via a shell function in the Bourne Shell or via and alias in the C Shell: vr=eval $( /usr/bin/X11/resize );vi -- Rob Gabbard (uunet!sdrc!evgabb) Technical Development Engineer Structural Dynamics Research Corp