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