1 0d0d65c9 2018-06-14 omar.polo MYMENU(1) - General Commands Manual
5 0d0d65c9 2018-06-14 omar.polo **mymenu** - simple menu for XOrg
7 ae801529 2018-07-13 omar.polo # SYNOPSIS
9 ae801529 2018-07-13 omar.polo **mymenu**
10 ae801529 2018-07-13 omar.polo \[**-hva**]
11 ae801529 2018-07-13 omar.polo \[**-p** *prompt*]
12 ae801529 2018-07-13 omar.polo \[**-x** *coord*]
13 ae801529 2018-07-13 omar.polo \[**-y** *coord*]
14 844addbb 2018-07-15 omar.polo \[**-W** *width*]
15 844addbb 2018-07-15 omar.polo \[**-H** *height*]
16 ae801529 2018-07-13 omar.polo \[**-P** *padding*]
17 ae801529 2018-07-13 omar.polo \[**-l** *layout*]
18 ae801529 2018-07-13 omar.polo \[**-f** *font*]
19 ae801529 2018-07-13 omar.polo \[**-b** *borders*]
20 844addbb 2018-07-15 omar.polo \[**-B** *colors*]
21 ae801529 2018-07-13 omar.polo \[**-t** *color*]
22 ae801529 2018-07-13 omar.polo \[**-T** *color*]
23 ae801529 2018-07-13 omar.polo \[**-c** *color*]
24 ae801529 2018-07-13 omar.polo \[**-C** *color*]
25 ae801529 2018-07-13 omar.polo \[**-s** *color*]
26 ae801529 2018-07-13 omar.polo \[**-S** *color*]
27 844addbb 2018-07-15 omar.polo \[**-w** *window*]
29 0d0d65c9 2018-06-14 omar.polo # DESCRIPTION
32 0d0d65c9 2018-06-14 omar.polo **mymenu**
33 0d0d65c9 2018-06-14 omar.polo utility a simple graphical menu for XOrg. It read the items from
34 0d0d65c9 2018-06-14 omar.polo **stdin**
35 0d0d65c9 2018-06-14 omar.polo and print the user selection to
36 0d0d65c9 2018-06-14 omar.polo **stdout**
37 0d0d65c9 2018-06-14 omar.polo on exit.
39 ae801529 2018-07-13 omar.polo The following options are available and take the maximum precedence
40 ae801529 2018-07-13 omar.polo over the (respective) ones defined in the
41 ae801529 2018-07-13 omar.polo **X Resource Database**
45 0d0d65c9 2018-06-14 omar.polo > Print a small usage message to stderr.
49 0d0d65c9 2018-06-14 omar.polo > Print version and exit.
53 ae801529 2018-07-13 omar.polo > The first completion (if any) is always selected. This is like dmenu.
55 ae801529 2018-07-13 omar.polo **-p** *prompt*
57 ae801529 2018-07-13 omar.polo > Override the prompt
59 ae801529 2018-07-13 omar.polo **-x** *val*
61 ae801529 2018-07-13 omar.polo > Override the positioning on the X axis, parsed as the resource MyMenu.x
63 ae801529 2018-07-13 omar.polo **-y** *val*
65 ae801529 2018-07-13 omar.polo > Override the positioning on the Y axis, parsed as the resource MyMenu.y
67 ae801529 2018-07-13 omar.polo **-P** *padding*
69 ae801529 2018-07-13 omar.polo > Override the padding. See the MyMenu.padding resource.
71 ae801529 2018-07-13 omar.polo **-l** *layout*
73 ae801529 2018-07-13 omar.polo > Override the layout. Parsed as MyMenu.layout.
75 ae801529 2018-07-13 omar.polo **-f** *font*
77 ae801529 2018-07-13 omar.polo > Override the font. See MyMenu.font.
79 ae801529 2018-07-13 omar.polo **-w** *val*
81 ae801529 2018-07-13 omar.polo > Override the width. Parsed as MyMenu.width.
83 ae801529 2018-07-13 omar.polo **-h** *val*
85 ae801529 2018-07-13 omar.polo > Override the height. Parsed as MyMenu.height.
87 ae801529 2018-07-13 omar.polo **-b** *borders*
89 ae801529 2018-07-13 omar.polo > Override the borders size. Parsed as MyMenu.border.size.
91 ae801529 2018-07-13 omar.polo **-B** *colors*
93 ae801529 2018-07-13 omar.polo > Override the borders color. Parsed as MyMenu.border.color.
95 ae801529 2018-07-13 omar.polo **-t** *color*
97 ae801529 2018-07-13 omar.polo > Override the prompt foreground color. See MyMenu.prompt.foreground.
99 ae801529 2018-07-13 omar.polo **-T** *color*
101 ae801529 2018-07-13 omar.polo > Override the prompt background color. See MyMenu.prompt.background.
103 ae801529 2018-07-13 omar.polo **-c** *color*
105 ae801529 2018-07-13 omar.polo > Override the completion foreground color. See MyMenu.completion.foreground.
107 ae801529 2018-07-13 omar.polo **-C** *color*
109 ae801529 2018-07-13 omar.polo > Override the completion background color. See MyMenu.completion.background.
111 ae801529 2018-07-13 omar.polo **-s** *color*
113 ae801529 2018-07-13 omar.polo > Override the highlighted completion foreground color. See MyMenu.completion\_highlighted.foreground.
115 ae801529 2018-07-13 omar.polo **-S** *color*
117 ae801529 2018-07-13 omar.polo > Override the highlighted completion background color. See MyMenu.completion\_highlighted.background.
119 844addbb 2018-07-15 omar.polo **-w** *window*
121 844addbb 2018-07-15 omar.polo > Embed into the given window id.
123 ae801529 2018-07-13 omar.polo # RESOURCES
125 0d0d65c9 2018-06-14 omar.polo MyMenu.font
127 0d0d65c9 2018-06-14 omar.polo > The font name to use. By default is set to "fixed" if compiled without
128 0d0d65c9 2018-06-14 omar.polo > Xft(3) support, "monospace" otherwise. Without Xft(3) only bitmap font
129 0d0d65c9 2018-06-14 omar.polo > are supported.
131 0d0d65c9 2018-06-14 omar.polo MyMenu.layout
133 0d0d65c9 2018-06-14 omar.polo > The layout of the menu. The possible values are "horizontal" and
134 0d0d65c9 2018-06-14 omar.polo > "vertical", with the default being "horizontal". Every other value
135 0d0d65c9 2018-06-14 omar.polo > than "horizontal" is treated like "vertical", but this is kinda an
136 0d0d65c9 2018-06-14 omar.polo > implementation detail and not something to be relied on, since in the
137 0d0d65c9 2018-06-14 omar.polo > future other layout could be added as well.
139 0d0d65c9 2018-06-14 omar.polo Mymenu.prompt
141 0d0d65c9 2018-06-14 omar.polo > A string that is rendered before the user input. Default to "$ ".
143 0d0d65c9 2018-06-14 omar.polo MyMenu.width
145 0d0d65c9 2018-06-14 omar.polo > The width of the menu. If a numeric value is given (e.g. 400) is
146 0d0d65c9 2018-06-14 omar.polo > interpreted as pixel, if it ends with a percentage symbol \`%'
147 0d0d65c9 2018-06-14 omar.polo > (e.g. 40%) the relative percentage will be computed (relative to the
148 0d0d65c9 2018-06-14 omar.polo > monitor width).
150 0d0d65c9 2018-06-14 omar.polo MyMenu.height
152 0d0d65c9 2018-06-14 omar.polo > The height of the menu. Like MyMenu.width if a numeric value is given
153 0d0d65c9 2018-06-14 omar.polo > is interpreted as pixel, if it ends with a percentage symbol \`%' the
154 0d0d65c9 2018-06-14 omar.polo > relative percentage will be computed (relative to the monitor height).
156 0d0d65c9 2018-06-14 omar.polo MyMenu.x
158 0d0d65c9 2018-06-14 omar.polo > The X coordinate of the topmost left corner of the window. Much like
159 0d0d65c9 2018-06-14 omar.polo > MyMenu.height and MyMenu.width both a pixel dimension and percentage
160 ae801529 2018-07-13 omar.polo > could be supplied. In addition to it, some special value can be used.
162 ae801529 2018-07-13 omar.polo > start
164 ae801529 2018-07-13 omar.polo > > Alias for 0;
166 ae801529 2018-07-13 omar.polo > middle
168 ae801529 2018-07-13 omar.polo > > Compute the correct value to make sure that mymenu will be
169 ae801529 2018-07-13 omar.polo > > horizontally centered;
173 ae801529 2018-07-13 omar.polo > > Compute the correct value to make sure that mymenu will be right
174 ae801529 2018-07-13 omar.polo > > aligned.
176 0d0d65c9 2018-06-14 omar.polo MyMenu.y
178 0d0d65c9 2018-06-14 omar.polo > The Y coordinate of the topmost left corner of the window. Like the X
179 0d0d65c9 2018-06-14 omar.polo > coordinate a pixel dimension, percentage dimension or the special
180 ae801529 2018-07-13 omar.polo > value "start", "middle", "end" could be supplied.
182 0d0d65c9 2018-06-14 omar.polo MyMenu.padding
184 0d0d65c9 2018-06-14 omar.polo > Change the padding. In the horizontal layout the padding is the space
185 0d0d65c9 2018-06-14 omar.polo > between the rectangle of the completion and the text as well as the
186 0d0d65c9 2018-06-14 omar.polo > space between the prompt and the first completion. In the horizontal
187 0d0d65c9 2018-06-14 omar.polo > layout the padding is the horizontal spacing between the window edge
188 0d0d65c9 2018-06-14 omar.polo > and the text as well as the space up and down the text within the
189 0d0d65c9 2018-06-14 omar.polo > completion. The default value is 10.
191 500ca6c1 2018-07-08 omar.polo MyMenu.border.size
193 500ca6c1 2018-07-08 omar.polo > A list of number separated by spaces to specify the border of the
194 500ca6c1 2018-07-08 omar.polo > window. The field is parsed like some CSS properties (i.e. padding),
195 500ca6c1 2018-07-08 omar.polo > that is: if only one value is provided then it'll be used for all
196 500ca6c1 2018-07-08 omar.polo > borders; if two value are given than the first will be used for the
197 500ca6c1 2018-07-08 omar.polo > top and bottom border and the former for the left and right border;
198 500ca6c1 2018-07-08 omar.polo > with three value the first is used for the top border, the second for
199 500ca6c1 2018-07-08 omar.polo > the left and right border and the third for the bottom border. If four
200 500ca6c1 2018-07-08 omar.polo > value are given, they'll be applied to the respective border
201 500ca6c1 2018-07-08 omar.polo > clockwise. Other values will be ignored. The default value is 0.
203 500ca6c1 2018-07-08 omar.polo MyMenu.border.color
205 500ca6c1 2018-07-08 omar.polo > A list of colors for the borders. This field is parsed like the
206 500ca6c1 2018-07-08 omar.polo > MyMenu.border.size. The default value is black.
208 0d0d65c9 2018-06-14 omar.polo MyMenu.prompt.background
210 0d0d65c9 2018-06-14 omar.polo > The background of the prompt.
212 0d0d65c9 2018-06-14 omar.polo MyMenu.prompt.foreground
214 0d0d65c9 2018-06-14 omar.polo > The text color (foreground) of the prompt.
216 0d0d65c9 2018-06-14 omar.polo MyMenu.completion.background
218 0d0d65c9 2018-06-14 omar.polo > The background of the completions.
220 0d0d65c9 2018-06-14 omar.polo MyMenu.completion.foreground
222 0d0d65c9 2018-06-14 omar.polo > The text color of the completions.
224 0d0d65c9 2018-06-14 omar.polo MyMenu.completion\_highlighted.background
226 0d0d65c9 2018-06-14 omar.polo > The background of the selected completion.
228 0d0d65c9 2018-06-14 omar.polo MyMenu.completion\_highlighted.foreground
230 0d0d65c9 2018-06-14 omar.polo > The foreground of the selected completion.
232 0d0d65c9 2018-06-14 omar.polo # KEYS
234 bee0837c 2018-07-01 omar.polo This is the list of keybinding recognized by
235 bee0837c 2018-07-01 omar.polo **mymenu**.
236 bee0837c 2018-07-01 omar.polo In the following examples, C-c means Control-c.
240 0d0d65c9 2018-06-14 omar.polo > Close the menu without selecting any entry
244 bee0837c 2018-07-01 omar.polo > The same as Esc
248 0d0d65c9 2018-06-14 omar.polo > Close the menu and print to stdout what the user typed
252 0d0d65c9 2018-06-14 omar.polo > The same as Enter
256 0d0d65c9 2018-06-14 omar.polo > Expand the prompt to the next possible completion
258 0d0d65c9 2018-06-14 omar.polo Shift Tab
260 0d0d65c9 2018-06-14 omar.polo > Expand the prompt to the previous possible completion
264 0d0d65c9 2018-06-14 omar.polo > The same as Tab
268 0d0d65c9 2018-06-14 omar.polo > The same as Shift-Tab
270 0d0d65c9 2018-06-14 omar.polo Backspace
272 0d0d65c9 2018-06-14 omar.polo > Delete the last character
276 0d0d65c9 2018-06-14 omar.polo > The same as Backspace
280 0d0d65c9 2018-06-14 omar.polo > Delete the last word
284 0d0d65c9 2018-06-14 omar.polo > Delete the whole line
288 6254fed8 2018-07-06 omar.polo > Toggle the \`\`first selected'' style. Sometimes, especially with the -a
289 6254fed8 2018-07-06 omar.polo > option, could be handy to disable that behaviour. Let's say that
290 6254fed8 2018-07-06 omar.polo > you've typed \`\`fire'' and the first completion is \`\`firefox'' but you
291 6254fed8 2018-07-06 omar.polo > really want to choose \`\`fire''. While you can type some spaces, this
292 6254fed8 2018-07-06 omar.polo > keybinding is a more elegant way to change, at runtime, the behaviour
293 6254fed8 2018-07-06 omar.polo > of the first completion.
295 0d0d65c9 2018-06-14 omar.polo # BUGS
297 0d0d65c9 2018-06-14 omar.polo * If, instead of a numeric value, a not-valid number that terminates
298 0d0d65c9 2018-06-14 omar.polo with the % sign is supplied, then the default value for that field
299 0d0d65c9 2018-06-14 omar.polo will be treated as a percentage. Since this is a misuse of the
300 0d0d65c9 2018-06-14 omar.polo resources this behavior isn't strictly considered a bug.
302 ae801529 2018-07-13 omar.polo * Keep in mind that sometimes the order of the options matter. First are
303 ae801529 2018-07-13 omar.polo parsed (if any) the xrdb options, then the command line flags
304 ae801529 2018-07-13 omar.polo **in the provided order!**
305 ae801529 2018-07-13 omar.polo That meas that if you're providing first the x coordinate, let's say
306 ae801529 2018-07-13 omar.polo "middle", and
307 ae801529 2018-07-13 omar.polo **after that**
308 ae801529 2018-07-13 omar.polo you are overriding the width, the window
309 ae801529 2018-07-13 omar.polo **will not be**
310 ae801529 2018-07-13 omar.polo centered.
312 ae801529 2018-07-13 omar.polo As a general rule of thumb, if you're overriding the width and/or the
313 ae801529 2018-07-13 omar.polo height of the window, remember to override the x and y coordinates as
316 0d0d65c9 2018-06-14 omar.polo # EXIT STATUS
318 0d0d65c9 2018-06-14 omar.polo 0 when the user select an entry, 1 when the user press Esc, EX\_USAGE
319 0d0d65c9 2018-06-14 omar.polo if used with wrong flags and EX\_UNAVAILABLE if the connection to X
320 0d0d65c9 2018-06-14 omar.polo fails.
322 0d0d65c9 2018-06-14 omar.polo # SEE ALSO
324 0d0d65c9 2018-06-14 omar.polo dmenu(1)
325 0d0d65c9 2018-06-14 omar.polo sysexits(3)
327 0d0d65c9 2018-06-14 omar.polo # AUTHORS
329 0d0d65c9 2018-06-14 omar.polo Omar Polo <omar.polo@europecom.net>
331 844addbb 2018-07-15 omar.polo OpenBSD 6.3 - July 15, 2018