-
Notifications
You must be signed in to change notification settings - Fork 4
/
qmenu.1
248 lines (234 loc) · 4.54 KB
/
qmenu.1
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
.TH QMENU "1" "6 September 2014"
.SH NAME
qmenu \- A tool to create simple menus for terminal interfaces
.SH SYNOPSIS
.B qmenu [\fIOPTION\fR] [menu_filename]
.SH DESCRIPTION
.PP
qmenu creates textual menus in an easy and intuitive way. Menu layout is read from menu_filename, a file with a .mnu extension.
.PP
.SH OPTIONS
.PP
\fB\-init\fR
create the configuration file "qmenu.cfg"
.TP
\fB\-model\fR
create a menu file model "model.mnu"
.PP
.SH SYNOPSYS
qmenu allows you to create menus for textual interfaces in an easy and intuitive way\. Each menu is defined in a file (with extension \.mnu) containing the menu's outline. The file is composed by three sections:
.
.IP "" 4
.
.nf
1\. Screen Area
2\. Item Area
3\. Option Area
.
.fi
.
.IP "" 0
.
.P
Sections are delimited by the characters $$ and %%, respectively:
.
.IP "" 4
.
.nf
Screen area
$$
Item area
%%
Option area
.
.fi
.
.IP "" 0
.
.SH "Screen area"
This area spans from the beginning of the file to the symbol $$, and contains the "drawing" of the menu in text format\. To make menu options selectable, they must be included between two symbols ^
.
.P
Example:
.
.IP "" 4
.
.nf
^1\. Option 1^
^2\. Option 2^
.
.fi
.
.IP "" 0
.
.P
The options can be highlighted with arrow keys or by pressing the first character of the string\. In this area you can also add some variables according to the following syntax:
.
.IP "" 4
.
.nf
x[NAME_VARIABILE]
.
.fi
.
.IP "" 0
.
.P
The name of the variable is made up by a prefix (x) and a name between square brackets\. The possibile values are:
.
.IP "" 4
.
.nf
* c \- Centered
* l \- Left\-justified
* r \- Right\-justified
.
.fi
.
.IP "" 0
.
.P
Note: If the symbol is capitalized, the value is shown in reverse
.
.P
Variables can assume the following values:
.
.IP "" 4
.
.nf
* TIME \- Current time
* MENUNAME \- Menu's name
* INFOTERM \- Terminal's name
* MNUTRACE \- Path menu
.
.fi
.
.IP "" 0
.
.P
Special variables:
.
.IP "" 4
.
.nf
& \- Cursor position
${PATH} \- Displays the contents of the environment variable PATH
.
.fi
.
.IP "" 0
.
.P
Example:
.
.IP "" 4
.
.nf
C[TITLE] \- Menu title centered and in reverse
.
.fi
.
.IP "" 0
.
.SH "Item area"
In this section, for each menu item you can define:
.
.IP "\(bu" 4
The action to perform
.
.IP "\(bu" 4
An help message
.
.IP "\(bu" 4
An empty row
.
.IP "" 0
.
.P
Each item is made up by 3 lines:
.
.IP "" 4
.
.nf
1\. Menu option
2\. Command to perform
3\. Help message
.
.fi
.
.IP "" 0
.
.IP "1." 4
In the first line, insert the first character of the string containing the menu option
.
.IP "2." 4
In the second line you can specify:
.
.IP "\(bu" 4
A shell command
.
.IP "\(bu" 4
A submenu to open ($menuname without extension)
.
.IP "\(bu" 4
A reserved command (return to go to the previous menu, end to quit menu)
.
.IP "" 0
.
.IP "3." 4
In the third line you can specify a message\. This message will replace the variable TITLE in the "Screen area"
.
.IP "" 0
.
.P
Example:
.
.IP "" 4
.
.nf
%1
ls \-lisa; read x
This item shows shell file list
.
.fi
.
.IP "" 0
.
.SH "Option area"
This section contains a series of generic settings:
.
.IP "" 4
.
.nf
TITOLO \- Menu title
RVS_ROW=0,22 \- Lines displayed in reverse\. In this case the lines 0 22
NOKEYDISP \- Disables automatic visualization of function keys labels (ET[1\-10])
ET[1\-10] \- Text shown to function key n if NOKEYDISP commented
FZ[1\-10] \- Command (shell) for the function key n
PW[1\-10] \- Password to set for the function key n
SHELL=sh \- Pressing shift\-f1 starts a shell session
EDITOR=vi \- Pressing shift\-f2 starts vi with the current menu
.
.fi
.
.IP "" 0
.
.SH AUTHORS
Written by Stefano Teodorani - \fIhttps://github\.com/teopost\fR.
.br
Translated by Lorenzo Teodorani - \fIhttps://github\.com/teopost2\fR.
.br
Thanks to Giovanni Juan Oteri - \fIhttps://twitter\.com/giovannioteri\fR
.br
.SH "REPORTING BUGS"
Please, report bugs to <https://github.com/teopost/qmenu/issues>
.br
General help using software: <https://github.com/teopost/qmenu>
.br
Report qmenu translation bugs to <https://github.com/teopost/qmenu/issues>
.SH COPYRIGHT
Copyright \(co 1992-2014 Stefano Teodorani
.PP
qmenu is free software: you are free to modify and/or redistribute it under the terms of the GNU General Public License version 3, or any later version. You should have received a copy of the GNU General Public License along with the source for qmenu, see the file COPYING. If now, you can find it at <http://gnu.org/licenses/gpl.html>.
.PP
qmenu is distributeded in the hope that it will be useful, but WITHOUT ANY WARRANTY, without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE