Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!wuarchive!zaphod.mps.ohio-state.edu!sdd.hp.com!hp-pcd!hpcvlx!bcripe From: bcripe@hpcvlx.cv.hp.com (Brian E. Cripe) Newsgroups: comp.sys.hp Subject: Re: standards for windowing software? Message-ID: <101950161@hpcvlx.cv.hp.com> Date: 31 Oct 90 18:55:53 GMT References: <1990Oct20.123109.7287@cs.dal.ca> Organization: Hewlett-Packard Co., Corvallis, OR, USA Lines: 112 >> Working with VUE I discovered that programs like vi and more assume a >> 24x80 window and won't adjust to work with any other size (for example, >> with a longer window they use only the top 24 lines). > > Lots of people since have talked about how to use the X11 "resize" > command before invoking the editor windows, et. al. but I think they've > missed the original problem that Bill was talking about; editor windows > *launched from VUE* are too small. Vi cannot resize dynamically once > it's started up (as far as I know), so once the window is there, he's > stuck with it at the wrong size. Good point Dave. I know I missed this aspect of the problem and it appears that others did as well. Fortunately there are a few solutions to this problem also. Before diving into how to configure VUE to give you the size terminals you want, I will explain a little about how VUE handles terminal windows. For faster start-up, VUE prestarts and caches a number of hpterm windows. When VUE wants to invoke a command that requires a terminal window it grabs one of its cached windows and ties the command to it. VUE actions that use a cached terminal are all of the COMMAND actions with a window type of TERMINAL, PERM-TERMINAL, or OUTPUT-ONLY. It is possible to also create actions that don't use cached terminals by defining them as NO-STDIO with an exec string of the form "hpterm -e ". This gives you a great deal of flexibility in the terminal characteristics (e.g. you can use xterm instead of hpterm) at the expense of start-up performance. Now for the question, how to make your VI windows in VUE bigger? One thing to understand is that you can control the characteristics of the cached terminals using the normal resource mechanisms. Therfore if you want all of your hpterm windows to be 80x40 instead of the default 80x24, then set the resource "hpterm*geometry: 80x40". [Some early versions of VUE have a bug where if you set the geometry using the class HPterm instead of the name hpterm, LINES and COLUMNS don't get picked up correctly.] This will make all of your terminal windows bigger, including the ones VUE caches. Alternatively if you want to change only the size of the Vi windows without changing the size of any other hpterm windows, then you need to define a new VI action that specifies the desired terminal size. For example, put the following entries in the file "$HOME/.vue/types/mine.ad" and then restart VUE. [The next version of VUE has dynamic database loading so you don't have to restart VUE after changing actions, but it isn't out yet.] ----------------------------------------------------------------- # The following entry causes all EDIT_TEXT requests to use my # BIG_VI action instead of the default VI action. EDIT_TEXT * action.l.bm action.s.bm MAP BIG_VI # The BIG_VI action runs vi in an 80x40 window. BIG_VI \ * \ action.l.bm \ action.s.bm \ COMMAND \ NO-STDIO \ %LocalHost% \ /usr/bin/X11/hpterm -geometry 80x40 \ -e "/usr/bin/vi %(File)Arg_1"Edit what file?"% ---------------------------------------------------------------- > He can have Vi pop up as a generic shell window (e.g. a solution like: > set EDITOR to "csh", then when the editor is launched from the VUE > ... This won't work because VUE does not used environment variables for customizing actions, mainly because environment variables don't carry enough information. Does your EDITOR need a terminal window (e.g. vi) or does it do its own windowing (e.g. xedit)? What host do you want to run your editor on? > Ultimately, there should be some easily user-accessible script or > command mapping scheme that has an entry like: > > EDIT_WINDOW > ICON = EDIT_WINDOW_ICON > CMD = xterm -e $EDITOR #1 > END I think you have described VUE's actions using a different syntax. For a full description of the action database, read Chapter 12 of the VUE System Administrator's Manual. Another place to get information is the header of /usr/lib/X11/vue/types/vue.ad (the default actions). [NOTE: Don't customize the standard vue.ad file! Copy it to either /usr/local/lib/X11/vue/types for system-wide customization or $HOME/.vue/types for personal customizations. Otherwise you will lose your customizations the next time you install VUE.] > It's worth noting that both of major the third party graphical user > environments, X.desktop and Looking Glass, offer features of this > nature (and both are more sophisticated than VUE too, in my view) What sophistication is VUE lacking? > In fact, in Looking Glass, for example, > one could have an editor icon that actually had a default window > size, but, with a CONTROL-button sequence, would actually pop up > a list of different size windows that the user could then choose > from ... You could do something similar in VUE by defining a set of actions like EDIT_80_20, EDIT_80_40, EDIT_80_60 ... then add these actions to the list of standard actions for the filetype. The first action in the list is the default that will be invoked when you double-click the file, the other actions are available under the Action menu when a file is selected. Brian Cripe Hewlett-Packard