Commit | Line | Data |
---|---|---|
430fecd4 | 1 | .\" @(#)window.1 3.3 83/08/25 |
93d5bf32 EW |
2 | .TH WINDOW 1 local |
3 | .SH NAME | |
4 | window \- multiple window shell | |
5 | .SH SYNOPSIS | |
05631f05 EW |
6 | .B window |
7 | [ | |
8 | .B \-t | |
9 | ] [ | |
10 | .B \-f | |
11 | ] [ | |
12 | .B \-d | |
13 | ] [ | |
14 | .B -e escape-char | |
15 | ] | |
93d5bf32 EW |
16 | .SH DESCRIPTION |
17 | \fIWindow\fP provides a window oriented working environment | |
18 | on ordinary CRT terminals. | |
19 | .PP | |
20 | Windows are rectangular partitions on the physical terminal screen | |
f85ea165 | 21 | that are indistinguishable from real terminals to processes running in |
05631f05 | 22 | them. Their sizes are determined at creation |
93d5bf32 EW |
23 | time. They are framed as necessary to mark the boundaries between |
24 | windows. Each window, like terminals, has a cursor and a set of | |
25 | control functions. Most intelligent terminal functions such as line and | |
05631f05 EW |
26 | character deletion and insertion are supported. Display modes |
27 | such as underlining and reverse video are supported if the terminal | |
28 | allows them. | |
f85ea165 | 29 | .PP |
430fecd4 EW |
30 | Each window has a text buffer which can be larger than the window. |
31 | Different parts of the buffer can be made visible through scrolling. | |
32 | .PP | |
e4414eae | 33 | Windows are labeled with the digits ``1'' through ``9'', |
05631f05 | 34 | thus a maximum of nine windows can exist at the same time. |
93d5bf32 | 35 | One window, the current window, is treated specially. |
05631f05 | 36 | This window is indicated by displaying its labels in reverse video. |
f85ea165 EW |
37 | .PP |
38 | Windows can overlap. Some can be completely obscured by others. | |
bdfe3733 | 39 | The current window is always on top of all others. |
93d5bf32 | 40 | .PP |
05631f05 EW |
41 | With each newly created window, a shell program is spawned with its |
42 | process environment tailored to that window. In particular, | |
43 | a pseudo-terminal device (\fIpty (4)\fP) is allocated, and becomes | |
44 | the standard input, output and diagnostic output of the shell. It's | |
45 | special characters and modes (see \fIstty (1)\fP) are copied from | |
46 | the user's real terminal. Also, | |
47 | a \fItermcap (5)\fP entry for this window is created | |
48 | and passed to the shell as \fIenviron (8)\fP | |
49 | variable \fBTERMCAP\fP. This \fItermcap\fP entry contains the window's | |
50 | size and characteristics as well as information about | |
51 | the real terminal, such as the existence of underline, reverse | |
52 | video and other display modes, and the codes produced by the terminal's | |
430fecd4 EW |
53 | keypad (if any). The name of the shell program used is obtained from |
54 | the environment variable \fBSHELL\fP. | |
05631f05 EW |
55 | .PP |
56 | When \fIwindow\fP starts up, the file \fI.windowrc\fP in the | |
57 | user's home directory is checked. If it exists, then the | |
58 | commands contained in it are executed (see \fIsource\fP command below). | |
59 | If \fI.windowrc\fP does not exist, then two | |
60 | equal sized windows are created by default. | |
61 | .PP | |
62 | The command line arguments are | |
63 | .TP | |
64 | .B -t | |
65 | Turn on terse mode (see \fIterse\fP command below). | |
66 | .TP | |
67 | .B -f | |
68 | Don't perform any startup action. | |
69 | .TP | |
70 | .B -d | |
71 | Ignore \fI.windowrc\fP and create the two default | |
72 | windows instead. | |
73 | .TP | |
74 | .B -e escape-char | |
75 | Set the escape character to \fIescape-char\fP. | |
76 | .PP | |
f85ea165 EW |
77 | The \fIwindow\fP program has two functional modes: command mode |
78 | and conversation mode. | |
f85ea165 | 79 | In conversation mode, the terminal's |
93d5bf32 EW |
80 | real cursor is placed at the cursor position of the current |
81 | window and all keyboard input is sent to the process in that | |
82 | window. Output from windows is displayed at all times, | |
83 | even in command mode. | |
f85ea165 EW |
84 | Typing \fIwindow\fP's escape character (normally ^P) |
85 | in conversation mode switches \fIwindow\fP into | |
93d5bf32 | 86 | command mode. In command mode, the top line of the |
05631f05 | 87 | terminal screen becomes the command prompt window. |
93d5bf32 | 88 | .PP |
e4414eae EW |
89 | There are two types of commands. Short commands are |
90 | usually one or two key strokes. Long commands are entered | |
91 | in the command window and terminated with carriage return | |
92 | or line feed (see the ``:'' command below). They consist | |
93 | of words separated by spaces or tabs. Words can be quoted | |
94 | to include the spacing characters. The ``\\'' convention | |
95 | of \fIC\fP applies. Alternately, long commands can be read | |
96 | in from files and executed (see \fIsource\fP below). | |
97 | .PP | |
98 | The short commands are | |
93d5bf32 EW |
99 | .TP |
100 | .B [1-9] | |
f85ea165 EW |
101 | Select window \fI[1-9]\fP as the current window |
102 | and return to conversation mode. | |
93d5bf32 EW |
103 | .TP |
104 | .B %[1-9] | |
f85ea165 | 105 | Select window \fI[1-9]\fP but stay in command mode. |
93d5bf32 EW |
106 | .TP |
107 | .B ? | |
108 | List a short summary of commands. | |
109 | .TP | |
f85ea165 EW |
110 | .B ^L |
111 | Redraw the screen. | |
112 | .TP | |
93d5bf32 EW |
113 | .B escape |
114 | Return to conversation mode. | |
115 | .TP | |
116 | .B ^P | |
117 | Return to conversation mode and write ^P to the | |
118 | current window. Thus, typing two ^P's in conversation | |
119 | mode sends one to the current window. If the \fIwindow\fP | |
120 | escape is changed to some other character, that | |
f85ea165 | 121 | character takes the place of ^P here. |
93d5bf32 | 122 | .TP |
f85ea165 EW |
123 | .B q |
124 | Exit \fIwindow\fP. Confirmation is requested. | |
93d5bf32 | 125 | .TP |
05631f05 EW |
126 | .B ^Z |
127 | Suspend \fIwindow\fP. | |
128 | .TP | |
93d5bf32 | 129 | .B w |
f85ea165 EW |
130 | Create a new window. You are prompted for the positions |
131 | of the upper left and lower right corners of the window. | |
e4414eae EW |
132 | The cursor is placed on the screen and the keys ``h'', ``j'', |
133 | ``k'', and ``l'' | |
134 | move the cursor left, down, up, and right, respectively. | |
135 | The keys ``H'', ``J'', ``K'', and ``L'' move the cursor to the respective | |
05631f05 | 136 | limits of the screen. Typing a number before the movement keys |
f85ea165 | 137 | repeats the movement that number of times. |
e4414eae | 138 | Return enters the cursor position |
93d5bf32 EW |
139 | as the upper left corner of the window. The lower right corner |
140 | is entered in the same manner. Typing escape (or ^[) at any | |
e4414eae | 141 | point cancels this command. |
93d5bf32 | 142 | .IP |
05631f05 | 143 | This window becomes the current window, |
430fecd4 EW |
144 | and is given the first available label. The default buffer size |
145 | is used (see \fIbuffer\fP command below). | |
146 | The | |
93d5bf32 EW |
147 | .TP |
148 | .B c[1-9] | |
05631f05 | 149 | Close window \fI[1-9]\fP. The process in the window is sent |
f85ea165 | 150 | the hangup signal (see \fIkill (1)\fP). \fICsh (1)\fP should |
93d5bf32 EW |
151 | handle this signal correctly and cause no problems. |
152 | .TP | |
153 | .B C | |
93d5bf32 EW |
154 | Close all windows. |
155 | .TP | |
f85ea165 | 156 | .B S |
93d5bf32 EW |
157 | Show all windows. Each window is brought to the top in sequence, |
158 | with the terminal cursor placed on its label. Typing escape | |
e4414eae EW |
159 | at this point will select the displayed window as the current window. |
160 | Return will display the next one. This command is useful | |
93d5bf32 | 161 | when there are a large number of windows and some are completely |
f85ea165 | 162 | hidden by others. |
93d5bf32 | 163 | .TP |
05631f05 EW |
164 | .B L |
165 | List all windows. A special window is opened and all user windows are | |
166 | listed in it with their labels. | |
167 | .TP | |
168 | .B ^Y | |
169 | Scroll the current window up by one line. | |
170 | .TP | |
171 | .B ^E | |
172 | Scroll the current window down by one line. | |
173 | .TP | |
93d5bf32 EW |
174 | .B ^U |
175 | Scroll the current window up by half the window size. | |
176 | .TP | |
177 | .B ^D | |
178 | Scroll the current window down by half the window size. | |
179 | .TP | |
180 | .B ^B | |
181 | Scroll the current window up by the full window size. | |
182 | .TP | |
183 | .B ^F | |
184 | Scroll the current window down by the full window size. | |
185 | .TP | |
186 | .B h | |
187 | Move the cursor of the current window left by one column. | |
188 | .TP | |
189 | .B j | |
190 | Move the cursor of the current window down by one line. | |
191 | .TP | |
192 | .B k | |
193 | Move the cursor of the current window up by one line. | |
194 | .TP | |
195 | .B l | |
196 | Move the cursor of the current window right by one column. | |
197 | .TP | |
f85ea165 EW |
198 | .B : |
199 | Enter a long command. | |
200 | .PP | |
e4414eae | 201 | The long commands: |
f85ea165 EW |
202 | .TP |
203 | .B escape C | |
204 | Set the escape character to \fIC\fP. | |
205 | .TP | |
206 | .B terse [off] | |
207 | Turn on (or off) terse mode. In terse mode, the command window | |
208 | stays hidden even in command mode, and errors are reported by | |
209 | sounding the terminal's bell. | |
210 | .TP | |
430fecd4 | 211 | .B window row col nrow ncol [nline] |
f85ea165 | 212 | Open a window with upper left corner at \fIrow\fP, \fIcol\fP |
430fecd4 EW |
213 | and size \fInrow\fP, \fIncol\fP. If \fInline\fP is specified, |
214 | then that many lines is allocated for the text buffer. Otherwise, | |
215 | the default buffer size is used. Using a \fB``*''\fP in place of | |
216 | \fIrow\fP, \fIcol\fP, \fInrow\fP, or \fIncol\fP gives, respectively, | |
217 | the up, left, down, or right extremes of the screen. | |
218 | .TP | |
219 | .B buffer nline | |
220 | Set the default buffer size to \fInline\fP. Initially, it is | |
221 | 48 lines. Using a very large buffer can slow the program down | |
222 | considerably. | |
f85ea165 EW |
223 | .TP |
224 | .B label [1-9] string | |
05631f05 | 225 | Label window \fI[1-9]\fP with \fIstring\fP. This is in addition |
e4414eae | 226 | to the numeric label that is always displayed. |
f85ea165 EW |
227 | .TP |
228 | .B %[1-9] | |
229 | Make window \fI[1-9]\fP the current window. | |
230 | .TP | |
05631f05 EW |
231 | .B write [1-9] string |
232 | Write \fIstring\fP to window \fI[1-9]\fP. | |
233 | .TP | |
234 | .B close [1-9] ... | |
235 | Close window \fI[1-9]\fP. More than one window can be specified. | |
236 | If no window is given, then all windows are closed. | |
237 | .TP | |
f85ea165 | 238 | .B source file |
e4414eae | 239 | Read and execute the long commands in \fIfile\fP. Recursive |
f85ea165 | 240 | \fIsource\fP is not allowed. |
93d5bf32 EW |
241 | .SH FILES |
242 | .ta 15 | |
f85ea165 EW |
243 | ~/.windowrc startup command file. |
244 | .br | |
93d5bf32 | 245 | /dev/ptyp? pseudo-terminal devices. |
93d5bf32 EW |
246 | .SH DIAGNOSTICS |
247 | Should be self explanatory. | |
248 | .SH BUGS | |
249 | When all pseudo-terminal devices are used, the \fB``w''\fP | |
f85ea165 | 250 | command fails mysteriously. |
93d5bf32 EW |
251 | .PP |
252 | When a window is scrolled or the cursor moved, output from | |
253 | the process in the window will be displayed at the new cursor | |
254 | position. This is consistent with real terminals but | |
255 | not always desirable. |