XEROX WHO-LINE 2 4 1 WHO-LINE 1 4 By: SML (Lanning.pa@Xerox.com) INTRODUCTION Need to know what package you're in? Don't know what your connected directory is? Fret not. The Who-Line is here. The Who-Line is a window that displays this information on your screen. It is continually updated to reflect the current state of the world (thanks to an entry on BACKGROUNDFNS). Additionally, items in the Who-Line can act as menu items, allowing you to change the state of the machine. Defining the information displayed in the Who-Line The values displayed in the Who-Line are determined by the setting of the variable *WHO-LINE-ENTRIES*. *WHO-LINE-ENTRIES* [Global Variable] *WHO-LINE-ENTRIES* is a list that describes the items that will be displayed in the who-line. Each item in the list should be a list of up to five things: the name of the item; a form that, when evaluated, will produce the value to display; the maximum number of characters in the value; an optional function to call if the item is selected (with the mouse) in the Who-Line; an optional form that will reset any internal state of the entry when evaluated; and an optional string that describes the value displayed by the entry. [[NOTE: Since the items on the Who-Line are evaluated rather often, it is best if they are fast and efficient (= don't CONS or allocate any space).]] The following are standard members of *WHO-LINE-ENTRIES*. *WHO-LINE-USER-ENTRY* [Variable] Displays the current user in the Who-Line. Selecting this item in the Who-Line will let you change the logged in user. *WHO-LINE-HOST-NAME-ENTRY* [Variable] Displays the (ETHERHOSTNAME) of the machine you are running on. *WHO-LINE-PACKAGE-ENTRY* [Variable] Displays the package of the current TTY process in the Who-Line. Selecting this item in the Who-Line will let you switch the package of the current TTY process. *WHO-LINE-READTABLE-ENTRY* [Variable] Displays the (name of the) readtable of the current TTY process in the Who-Line. Selecting this item in the Who-Line will let you switch the readtable of the current TTY process. *WHO-LINE-TTY-PROC-ENTRY* [Variable] Displays the name of the current TTY process in the Who-Line. Selecting this item in the Who-Line will let you give the TTY to a different process. *WHO-LINE-DIRECTORY-ENTRY* [Variable] Displays the current connected directory in the Who-Line; the directory is shown in the format "Dir>Subdir>...>Subdir on {Host}". Selecting this item in the Who-Line will let you connect to another directory: the variable *WHO-LINE-DIRECTORIES* (see below) is used to produce a menu of interesting directories. If you are holding down a SHIFT key when you select an item from this menu, the directory name will be COPYINSERTed into the current tty input stream, otherwise you will be connected to that directory. *WHO-LINE-VMEM-ENTRY* [Variable] Displays the percentage of the VMem file that is currently being used in the Who-Line. If the VMem file is inconsistant, the number will be preceeded by an asterik ("*"). Selecting this item in the Who-Line will let you do a (SAVEVM). *WHO-LINE-SYMBOL-SPACE-ENTRY* [Variable] Displays the percentage of symbol space that is currently in use. *WHO-LINE-TIME-ENTRY* [ Variable] Displays the current time in the Who-Line. Selecting this item in the Who-Line will let you do a (SETTIME). If you hold down a shift key when you select this item, the current time will be COPYINSERTed into the current tty input stream instead. The default value of *WHO-LINE-ENTRIES* contains all these items Other ways to tailor the Who-Line *WHO-LINE-ANCHOR* [Variable] *WHO-LINE-ANCHOR* describes where the who-line will be displayed. If *WHO-LINE-ANCHOR* contains the symbol :TOP, the Who-Line will be anchored at the top of the screen; if it contains the symbol :BOTTOM it will be anchored at the bottom of the screen. If *WHO-LINE-ANCHOR* contains the symbol :LEFT, it will be anchored to the left side of the display; if it contains the symbol :CENTER it will be centered on the screen; if it contains the symbol :JUSTIFY it will run the width of the screen; if it contains the symbol :RIGHT it will be anchored to the right side of the screen. Finally, if *WHO-LINE-ANCHOR* is a POSITION, it will be used as the lower left corner of the Who-Line. The default value is (:CENTER :BOTTOM). *WHO-LINE-NAME-FONT* [Variable] The font used to display the names of the items in the who-line. The default is HELVETICA 8 BOLD. *WHO-LINE-VALUE-FONT* [Variable] The font used to display the values in the who-line. The default is GACHA 8. *WHO-LINE-COLOR* [Variable] The color of the Who-Line. Legal values are the keywords :WHITE and :BLACK. The default is :WHITE. *WHO-LINE-BORDER* [Variable] The border width of the Who-Line window. The default is 2. *WHO-LINE-TITLE* [Variable] The title of the Who-Line window. The default is NIL. *WHO-LINE-DISPLAY-NAMES?* [Variable] If *WHO-LINE-DISPLAY-NAMES?* is true, the names of items in the who-line will be displayed; otherwise they will not be shown. The default value is T. *WHO-LINE-UPDATE-INTERVAL* [Variable] The number of milliseconds between updates of the who-line. The default is 100 milliseconds. Installing new Who-Line options Changing the above variables has no direct effect on the who-line. These values need to be installed in the Who-Line before they can take effect. (INSTALL-WHO-LINE-OPTIONS) [Function] INSTALL-WHO-LINE-OPTIONS installs the above options in the Who-Line, and updates the Who-Line accordingly. The Who-Line supports an easy way to interactivly add or remove entries. If you click on the Who-Line while holding down the EDIT or CONTROL key, you will be given a chance to add or remove items from the Who-Line. *WHO-LINE-ENTRY-REGISTRY* [Global Variable] A list of all known Who-Line entries. This is used to construct the menu of possible new entries for the Who-Line. Who-Line process state The who-line entry *WHO-LINE-TTY-STATE-ENTRY* tries to display the current state of the TTY process. *WHO-LINE-TTY-STATE-ENTRY* [Variable] A Who-Line entry that displays the "state" of the current TTY process in the Who-Line. The typical state of a process is the name of the function that is currently running in that process. This simple minded result can be altered by use of the following items. [[NOTE: Because of the nature of the Xerox Lisp scheduler, this information is almost always out of date.]] The Who-Line "state" can be explicitly controlled from code. If the special variable *WHO-LINE-STATE* is bound, its value is taken to be the state of that process. You can use this feature to provide visual indiation of the state of your code by using the programming idiom: (LET ((*WHO-LINE-STATE* indicator)) (BLOCK) ;Give the Who-line a chance to run ...your-code...) This will run the ...your-code... with the Who-Line state of the process set to (the value of) indicator. The call to BLOCK insures that the Who-Line has a chance to update before ...your-code... is run. *WHO-LINE-STATE-UNINTERESTING-FNS* [Global Variable] If there is no declared who-line state (via a WITH-WHO-LINE-STATE form), then the name of the function that is currently running is used as the who-line state. However, if the function is on the list *WHO-LINE-STATE-UNINTERESTING-FNS*, the function that called it is used instead. The default value of *WHO-LINE-STATE-UNINTERESTING-FNS* is (BLOCK AWAIT.EVENT). WHO-LINE-STATE [Property] If the function that is currently running has a WHO-LINE-STATE property, the value of that property is used as the who-line state. This is used to convert functions like \TTYBACKGROUND to meaningful values like "TTY wait". (WHO-LINE-REDISPLAY-INTERRUPT) [Function] Updates the Who-Line. It is intended that this function be installed on an interrupt character, so that the user can easily force an update of the Who-Line. For example, (ADVISE 'CONTROL-T 'BEFORE '(WHO-LINE-REDISPLAY-INTERRUPT)) will cause a ^T interrupt to update the Who-Line as well as its current behavior of printing state information in the Prompt window. Alternatly, you can define a new interrupt character that will force an update of the Who-Line; (INTERRUPTCHAR (CHARCODE ^U) '(WHO-LINE-REDISPLAY-INTERRUPT) 'MOUSE) will cause the Who-Line to be updated whenever the user hits a ^U. Other interesting things *WHO-LINE-DIRECTORIES* [Global Variable] A list of interesting directories used to generate a pop-up menu of directories to connect to when you select the DIRECTORY item in the Who-Line. The default value is a list containing just your LOGINHOST/DIR. When the Who-Line notices that you have changed your connected directory, it updates this list to contain the new directory. (CURRENT-TTY-PACKAGE) [Function] Returns the name of the package of the current TTY process. This function is used in the default value of *WHO-LINE-ENTRIES*. (CURRENT-TTY-READTABLE-NAME) [Function] Returns the name of the readtable of the current TTY process, or the string "Unknown" if it can't figure out the name. This function is used in the default value of *WHO-LINE-ENTRIES*. (SET-PACKAGE-INTERACTIVELY) [Function] Pops up a menu of currently defined packages. If the user selects one of them, the current package is changed to the selected package. (SET-READTABLE-INTERACTIVELY) [Function] Pops up a menu of currently known readtables. If the user selects one of them, the current readtable is changed to the selected readtable.(LIST ((PAGE NIL (PAPERSIZE LETTER STARTINGPAGE# 289) (0 0 612 792) ((FOLIO NIL (PARALOOKS (QUAD CENTERED) CHARLOOKS (SUPERSCRIPT 0 INVISIBLE OFF SELECTPOINT OFF PROTECTED OFF SIZE 10 FAMILY MODERN OVERLINE OFF STRIKEOUT OFF UNDERLINE OFF EXPANSION REGULAR SLOPE REGULAR WEIGHT MEDIUM INVERTED OFF USERINFO NIL STYLE NIL) FORMATINFO NIL) (174 36 288 36) NIL) (HEADING NIL (HEADINGTYPE RUNNINGHEAD) (84 744 528 36) NIL) (TEXT NIL NIL (84 96 456 600) NIL))) (PAGE NIL (PAPERSIZE NIL . LETTER) (0 0 612 792) ((FOLIO NIL (PARALOOKS (QUAD CENTERED) CHARLOOKS (SUPERSCRIPT 0 INVISIBLE OFF SELECTPOINT OFF PROTECTED OFF SIZE 10 FAMILY MODERN OVERLINE OFF STRIKEOUT OFF UNDERLINE OFF EXPANSION REGULAR SLOPE REGULAR WEIGHT MEDIUM INVERTED OFF USERINFO NIL STYLE NIL) FORMATINFO NIL) (174 36 288 36) NIL) (HEADING NIL (HEADINGTYPE RUNNINGHEAD) (84 744 528 36) NIL) (TEXT NIL NIL (84 96 456 600) NIL))) (PAGE NIL (PAPERSIZE NIL . LETTER) (0 0 612 792) ((FOLIO NIL (PARALOOKS (QUAD CENTERED) CHARLOOKS (SUPERSCRIPT 0 INVISIBLE OFF SELECTPOINT OFF PROTECTED OFF SIZE 10 FAMILY MODERN OVERLINE OFF STRIKEOUT OFF UNDERLINE OFF EXPANSION REGULAR SLOPE REGULAR WEIGHT MEDIUM INVERTED OFF USERINFO NIL STYLE NIL) FORMATINFO NIL) (174 36 288 36) NIL) (HEADING NIL (HEADINGTYPE RUNNINGHEAD) (84 744 528 36) NIL) (TEXT NIL NIL (84 96 456 600) NIL)))))1ÈÈ(È.$$¤ h(È(ŠŠ8(ŠŠ8DÈÈ PAGEHEADING RUNNINGHEAD TERMINAL MODERN MODERN  HELVETICA MODERN MODERN MODERN MODERNLOGO   HRULE.GETFNMODERN  HRULE.GETFNMODERN  HRULE.GETFNMODERN   HRULE.GETFNMODERN  HRULE.GETFNMODERN  v!3g—:!x @ £ ´ •  í B ÷A" × c N e < 7 — ^!“ kØte k  "> M "cà*¬>çGCQ  º ˆ ‹% ùzº