| 1 | .\" @(#)window.1 1.4 83/08/09 |
| 2 | .TH WINDOW 1 local |
| 3 | .SH NAME |
| 4 | window \- multiple window shell |
| 5 | .SH SYNOPSIS |
| 6 | window |
| 7 | .SH DESCRIPTION |
| 8 | \fIWindow\fP provides a window oriented working environment |
| 9 | on ordinary CRT terminals. |
| 10 | .PP |
| 11 | Windows are rectangular partitions on the physical terminal screen |
| 12 | that are indistinguishable from real terminals to processes running in |
| 13 | them. Their sizes and placement are determined at creation |
| 14 | time. They are framed as necessary to mark the boundaries between |
| 15 | windows. Each window, like terminals, has a cursor and a set of |
| 16 | control functions. Most intelligent terminal functions such as line and |
| 17 | character deletion and insertion are supported. A \fItermcap (5)\fP |
| 18 | entry tailored to each window is passed on to its processes |
| 19 | in the environment (see \fIenviron (8)\fP). A pseudo-terminal |
| 20 | device (\fIpty (4)\fP) is allocated for each window. This becomes |
| 21 | the standard input, output, and diagnostic output of the processes. |
| 22 | Initially a shell, usually \fIcsh (1)\fP, is placed in the window. |
| 23 | .PP |
| 24 | Windows are labeled with the digits ``1'' through ``9'', |
| 25 | thus a maximum of nine windows are supported. |
| 26 | One window, the current window, is treated specially. |
| 27 | This window is indicated by displaying its label in reverse video. |
| 28 | .PP |
| 29 | Windows can overlap. Some can be completely obscured by others. |
| 30 | The current window is always on top of all others. |
| 31 | .PP |
| 32 | The \fIwindow\fP program has two functional modes: command mode |
| 33 | and conversation mode. |
| 34 | In conversation mode, the terminal's |
| 35 | real cursor is placed at the cursor position of the current |
| 36 | window and all keyboard input is sent to the process in that |
| 37 | window. Output from windows is displayed at all times, |
| 38 | even in command mode. |
| 39 | Typing \fIwindow\fP's escape character (normally ^P) |
| 40 | in conversation mode switches \fIwindow\fP into |
| 41 | command mode. In command mode, the top line of the |
| 42 | terminal screen becomes the command prompt window, |
| 43 | and the cursor in the current window is replaced by a |
| 44 | blinking reverse video block (if these functions are supported |
| 45 | by the terminal). |
| 46 | .PP |
| 47 | There are two types of commands. Short commands are |
| 48 | usually one or two key strokes. Long commands are entered |
| 49 | in the command window and terminated with carriage return |
| 50 | or line feed (see the ``:'' command below). They consist |
| 51 | of words separated by spaces or tabs. Words can be quoted |
| 52 | to include the spacing characters. The ``\\'' convention |
| 53 | of \fIC\fP applies. Alternately, long commands can be read |
| 54 | in from files and executed (see \fIsource\fP below). |
| 55 | .PP |
| 56 | The short commands are |
| 57 | .TP |
| 58 | .B [1-9] |
| 59 | Select window \fI[1-9]\fP as the current window |
| 60 | and return to conversation mode. |
| 61 | .TP |
| 62 | .B %[1-9] |
| 63 | Select window \fI[1-9]\fP but stay in command mode. |
| 64 | .TP |
| 65 | .B ? |
| 66 | List a short summary of commands. |
| 67 | .TP |
| 68 | .B ^L |
| 69 | Redraw the screen. |
| 70 | .TP |
| 71 | .B escape |
| 72 | Return to conversation mode. |
| 73 | .TP |
| 74 | .B ^P |
| 75 | Return to conversation mode and write ^P to the |
| 76 | current window. Thus, typing two ^P's in conversation |
| 77 | mode sends one to the current window. If the \fIwindow\fP |
| 78 | escape is changed to some other character, that |
| 79 | character takes the place of ^P here. |
| 80 | .TP |
| 81 | .B q |
| 82 | Exit \fIwindow\fP. Confirmation is requested. |
| 83 | .TP |
| 84 | .B w |
| 85 | Create a new window. You are prompted for the positions |
| 86 | of the upper left and lower right corners of the window. |
| 87 | The cursor is placed on the screen and the keys ``h'', ``j'', |
| 88 | ``k'', and ``l'' |
| 89 | move the cursor left, down, up, and right, respectively. |
| 90 | The keys ``H'', ``J'', ``K'', and ``L'' move the cursor to the respective |
| 91 | limits of the screen. Number before the movement keys |
| 92 | repeats the movement that number of times. |
| 93 | Return enters the cursor position |
| 94 | as the upper left corner of the window. The lower right corner |
| 95 | is entered in the same manner. Typing escape (or ^[) at any |
| 96 | point cancels this command. |
| 97 | .IP |
| 98 | The environment variable SHELL is checked to find the |
| 99 | name of the shell program to place in the window. |
| 100 | \fICsh\fP (1) is used by default. |
| 101 | .IP |
| 102 | This window is given the first available label. |
| 103 | .TP |
| 104 | .B c[1-9] |
| 105 | Close the window \fI[1-9]\fP. The process in the window is sent |
| 106 | the hangup signal (see \fIkill (1)\fP). \fICsh (1)\fP should |
| 107 | handle this signal correctly and cause no problems. |
| 108 | .TP |
| 109 | .B C |
| 110 | Close all windows. |
| 111 | .TP |
| 112 | .B S |
| 113 | Show all windows. Each window is brought to the top in sequence, |
| 114 | with the terminal cursor placed on its label. Typing escape |
| 115 | at this point will select the displayed window as the current window. |
| 116 | Return will display the next one. This command is useful |
| 117 | when there are a large number of windows and some are completely |
| 118 | hidden by others. |
| 119 | .TP |
| 120 | .B ^U |
| 121 | Scroll the current window up by half the window size. |
| 122 | .TP |
| 123 | .B ^D |
| 124 | Scroll the current window down by half the window size. |
| 125 | .TP |
| 126 | .B ^B |
| 127 | Scroll the current window up by the full window size. |
| 128 | .TP |
| 129 | .B ^F |
| 130 | Scroll the current window down by the full window size. |
| 131 | .TP |
| 132 | .B h |
| 133 | Move the cursor of the current window left by one column. |
| 134 | .TP |
| 135 | .B j |
| 136 | Move the cursor of the current window down by one line. |
| 137 | .TP |
| 138 | .B k |
| 139 | Move the cursor of the current window up by one line. |
| 140 | .TP |
| 141 | .B l |
| 142 | Move the cursor of the current window right by one column. |
| 143 | .TP |
| 144 | .B : |
| 145 | Enter a long command. |
| 146 | .PP |
| 147 | The long commands: |
| 148 | .TP |
| 149 | .B escape C |
| 150 | Set the escape character to \fIC\fP. |
| 151 | .TP |
| 152 | .B terse [off] |
| 153 | Turn on (or off) terse mode. In terse mode, the command window |
| 154 | stays hidden even in command mode, and errors are reported by |
| 155 | sounding the terminal's bell. |
| 156 | .TP |
| 157 | .B window row col nrow ncol |
| 158 | Open a window with upper left corner at \fIrow\fP, \fIcol\fP |
| 159 | and size \fInrow\fP, \fIncol\fP. |
| 160 | .TP |
| 161 | .B label [1-9] string |
| 162 | Label the window \fI[1-9]\fP with \fIstring\fP. This is in addition |
| 163 | to the numeric label that is always displayed. |
| 164 | .TP |
| 165 | .B %[1-9] |
| 166 | Make window \fI[1-9]\fP the current window. |
| 167 | .TP |
| 168 | .B source file |
| 169 | Read and execute the long commands in \fIfile\fP. Recursive |
| 170 | \fIsource\fP is not allowed. |
| 171 | .PP |
| 172 | When \fIwindow\fP starts up, the file \fI.windowrc\fP in the |
| 173 | user's home directory is checked. If it exists, then the |
| 174 | commands contained in it are executed (using \fIsource\fP). |
| 175 | If \fI.windowrc\fP does not exist, then two |
| 176 | equal sized windows are created by default. |
| 177 | .SH FILES |
| 178 | .ta 15 |
| 179 | ~/.windowrc startup command file. |
| 180 | .br |
| 181 | /dev/ptyp? pseudo-terminal devices. |
| 182 | .SH DIAGNOSTICS |
| 183 | Should be self explanatory. |
| 184 | .SH BUGS |
| 185 | When all pseudo-terminal devices are used, the \fB``w''\fP |
| 186 | command fails mysteriously. |
| 187 | .PP |
| 188 | When a window is scrolled or the cursor moved, output from |
| 189 | the process in the window will be displayed at the new cursor |
| 190 | position. This is consistent with real terminals but |
| 191 | not always desirable. |