Blob


1 MYMENU(1) - General Commands Manual
3 # NAME
5 **mymenu** - simple menu for XOrg
7 # SYNOPSIS
9 **mymenu**
10 \[**-hva**]
11 \[**-p** *prompt*]
12 \[**-x** *coord*]
13 \[**-y** *coord*]
14 \[**-w** *width*]
15 \[**-h** *height*]
16 \[**-P** *padding*]
17 \[**-l** *layout*]
18 \[**-f** *font*]
19 \[**-b** *borders*]
20 \[**-B** *color*]
21 \[**-t** *color*]
22 \[**-T** *color*]
23 \[**-c** *color*]
24 \[**-C** *color*]
25 \[**-s** *color*]
26 \[**-S** *color*]
28 # DESCRIPTION
30 The
31 **mymenu**
32 utility a simple graphical menu for XOrg. It read the items from
33 **stdin**
34 and print the user selection to
35 **stdout**
36 on exit.
38 The following options are available and take the maximum precedence
39 over the (respective) ones defined in the
40 **X Resource Database**
42 **-h**
44 > Print a small usage message to stderr.
46 **-v**
48 > Print version and exit.
50 **-a**
52 > The first completion (if any) is always selected. This is like dmenu.
54 **-p** *prompt*
56 > Override the prompt
58 **-x** *val*
60 > Override the positioning on the X axis, parsed as the resource MyMenu.x
62 **-y** *val*
64 > Override the positioning on the Y axis, parsed as the resource MyMenu.y
66 **-P** *padding*
68 > Override the padding. See the MyMenu.padding resource.
70 **-l** *layout*
72 > Override the layout. Parsed as MyMenu.layout.
74 **-f** *font*
76 > Override the font. See MyMenu.font.
78 **-w** *val*
80 > Override the width. Parsed as MyMenu.width.
82 **-h** *val*
84 > Override the height. Parsed as MyMenu.height.
86 **-b** *borders*
88 > Override the borders size. Parsed as MyMenu.border.size.
90 **-B** *colors*
92 > Override the borders color. Parsed as MyMenu.border.color.
94 **-t** *color*
96 > Override the prompt foreground color. See MyMenu.prompt.foreground.
98 **-T** *color*
100 > Override the prompt background color. See MyMenu.prompt.background.
102 **-c** *color*
104 > Override the completion foreground color. See MyMenu.completion.foreground.
106 **-C** *color*
108 > Override the completion background color. See MyMenu.completion.background.
110 **-s** *color*
112 > Override the highlighted completion foreground color. See MyMenu.completion\_highlighted.foreground.
114 **-S** *color*
116 > Override the highlighted completion background color. See MyMenu.completion\_highlighted.background.
118 # RESOURCES
120 MyMenu.font
122 > The font name to use. By default is set to "fixed" if compiled without
123 > Xft(3) support, "monospace" otherwise. Without Xft(3) only bitmap font
124 > are supported.
126 MyMenu.layout
128 > The layout of the menu. The possible values are "horizontal" and
129 > "vertical", with the default being "horizontal". Every other value
130 > than "horizontal" is treated like "vertical", but this is kinda an
131 > implementation detail and not something to be relied on, since in the
132 > future other layout could be added as well.
134 Mymenu.prompt
136 > A string that is rendered before the user input. Default to "$ ".
138 MyMenu.width
140 > The width of the menu. If a numeric value is given (e.g. 400) is
141 > interpreted as pixel, if it ends with a percentage symbol \`%'
142 > (e.g. 40%) the relative percentage will be computed (relative to the
143 > monitor width).
145 MyMenu.height
147 > The height of the menu. Like MyMenu.width if a numeric value is given
148 > is interpreted as pixel, if it ends with a percentage symbol \`%' the
149 > relative percentage will be computed (relative to the monitor height).
151 MyMenu.x
153 > The X coordinate of the topmost left corner of the window. Much like
154 > MyMenu.height and MyMenu.width both a pixel dimension and percentage
155 > could be supplied. In addition to it, some special value can be used.
157 > start
159 > > Alias for 0;
161 > middle
163 > > Compute the correct value to make sure that mymenu will be
164 > > horizontally centered;
166 > end
168 > > Compute the correct value to make sure that mymenu will be right
169 > > aligned.
171 MyMenu.y
173 > The Y coordinate of the topmost left corner of the window. Like the X
174 > coordinate a pixel dimension, percentage dimension or the special
175 > value "start", "middle", "end" could be supplied.
177 MyMenu.padding
179 > Change the padding. In the horizontal layout the padding is the space
180 > between the rectangle of the completion and the text as well as the
181 > space between the prompt and the first completion. In the horizontal
182 > layout the padding is the horizontal spacing between the window edge
183 > and the text as well as the space up and down the text within the
184 > completion. The default value is 10.
186 MyMenu.border.size
188 > A list of number separated by spaces to specify the border of the
189 > window. The field is parsed like some CSS properties (i.e. padding),
190 > that is: if only one value is provided then it'll be used for all
191 > borders; if two value are given than the first will be used for the
192 > top and bottom border and the former for the left and right border;
193 > with three value the first is used for the top border, the second for
194 > the left and right border and the third for the bottom border. If four
195 > value are given, they'll be applied to the respective border
196 > clockwise. Other values will be ignored. The default value is 0.
198 MyMenu.border.color
200 > A list of colors for the borders. This field is parsed like the
201 > MyMenu.border.size. The default value is black.
203 MyMenu.prompt.background
205 > The background of the prompt.
207 MyMenu.prompt.foreground
209 > The text color (foreground) of the prompt.
211 MyMenu.completion.background
213 > The background of the completions.
215 MyMenu.completion.foreground
217 > The text color of the completions.
219 MyMenu.completion\_highlighted.background
221 > The background of the selected completion.
223 MyMenu.completion\_highlighted.foreground
225 > The foreground of the selected completion.
227 # KEYS
229 This is the list of keybinding recognized by
230 **mymenu**.
231 In the following examples, C-c means Control-c.
233 Esc
235 > Close the menu without selecting any entry
237 C-c
239 > The same as Esc
241 Enter
243 > Close the menu and print to stdout what the user typed
245 C-m
247 > The same as Enter
249 Tab
251 > Expand the prompt to the next possible completion
253 Shift Tab
255 > Expand the prompt to the previous possible completion
257 C-n
259 > The same as Tab
261 C-p
263 > The same as Shift-Tab
265 Backspace
267 > Delete the last character
269 C-h
271 > The same as Backspace
273 C-w
275 > Delete the last word
277 C-u
279 > Delete the whole line
281 C-i
283 > Toggle the \`\`first selected'' style. Sometimes, especially with the -a
284 > option, could be handy to disable that behaviour. Let's say that
285 > you've typed \`\`fire'' and the first completion is \`\`firefox'' but you
286 > really want to choose \`\`fire''. While you can type some spaces, this
287 > keybinding is a more elegant way to change, at runtime, the behaviour
288 > of the first completion.
290 # BUGS
292 * If, instead of a numeric value, a not-valid number that terminates
293 with the % sign is supplied, then the default value for that field
294 will be treated as a percentage. Since this is a misuse of the
295 resources this behavior isn't strictly considered a bug.
297 * C-w (delete last word) does not work well with multi-byte string. The
298 whole UTF-8 support is still kinda naïve and should be improved.
300 * Keep in mind that sometimes the order of the options matter. First are
301 parsed (if any) the xrdb options, then the command line flags
302 **in the provided order!**
303 That meas that if you're providing first the x coordinate, let's say
304 "middle", and
305 **after that**
306 you are overriding the width, the window
307 **will not be**
308 centered.
310 As a general rule of thumb, if you're overriding the width and/or the
311 height of the window, remember to override the x and y coordinates as
312 well.
314 # EXIT STATUS
316 0 when the user select an entry, 1 when the user press Esc, EX\_USAGE
317 if used with wrong flags and EX\_UNAVAILABLE if the connection to X
318 fails.
320 # SEE ALSO
322 dmenu(1)
323 sysexits(3)
325 # AUTHORS
327 Omar Polo <omar.polo@europecom.net>
329 OpenBSD 6.3 - July 13, 2018