Blame


1 0d0d65c9 2018-06-14 omar.polo MYMENU(1) - General Commands Manual
2 0d0d65c9 2018-06-14 omar.polo
3 0d0d65c9 2018-06-14 omar.polo # NAME
4 0d0d65c9 2018-06-14 omar.polo
5 0d0d65c9 2018-06-14 omar.polo **mymenu** - simple menu for XOrg
6 0d0d65c9 2018-06-14 omar.polo
7 ae801529 2018-07-13 omar.polo # SYNOPSIS
8 ae801529 2018-07-13 omar.polo
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 ae801529 2018-07-13 omar.polo \[**-w** *width*]
15 ae801529 2018-07-13 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 ae801529 2018-07-13 omar.polo \[**-B** *color*]
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 ae801529 2018-07-13 omar.polo
28 0d0d65c9 2018-06-14 omar.polo # DESCRIPTION
29 0d0d65c9 2018-06-14 omar.polo
30 0d0d65c9 2018-06-14 omar.polo The
31 0d0d65c9 2018-06-14 omar.polo **mymenu**
32 0d0d65c9 2018-06-14 omar.polo utility a simple graphical menu for XOrg. It read the items from
33 0d0d65c9 2018-06-14 omar.polo **stdin**
34 0d0d65c9 2018-06-14 omar.polo and print the user selection to
35 0d0d65c9 2018-06-14 omar.polo **stdout**
36 0d0d65c9 2018-06-14 omar.polo on exit.
37 0d0d65c9 2018-06-14 omar.polo
38 ae801529 2018-07-13 omar.polo The following options are available and take the maximum precedence
39 ae801529 2018-07-13 omar.polo over the (respective) ones defined in the
40 ae801529 2018-07-13 omar.polo **X Resource Database**
41 0d0d65c9 2018-06-14 omar.polo
42 0d0d65c9 2018-06-14 omar.polo **-h**
43 0d0d65c9 2018-06-14 omar.polo
44 0d0d65c9 2018-06-14 omar.polo > Print a small usage message to stderr.
45 0d0d65c9 2018-06-14 omar.polo
46 0d0d65c9 2018-06-14 omar.polo **-v**
47 0d0d65c9 2018-06-14 omar.polo
48 0d0d65c9 2018-06-14 omar.polo > Print version and exit.
49 0d0d65c9 2018-06-14 omar.polo
50 ae801529 2018-07-13 omar.polo **-a**
51 0d0d65c9 2018-06-14 omar.polo
52 ae801529 2018-07-13 omar.polo > The first completion (if any) is always selected. This is like dmenu.
53 0d0d65c9 2018-06-14 omar.polo
54 ae801529 2018-07-13 omar.polo **-p** *prompt*
55 ae801529 2018-07-13 omar.polo
56 ae801529 2018-07-13 omar.polo > Override the prompt
57 ae801529 2018-07-13 omar.polo
58 ae801529 2018-07-13 omar.polo **-x** *val*
59 ae801529 2018-07-13 omar.polo
60 ae801529 2018-07-13 omar.polo > Override the positioning on the X axis, parsed as the resource MyMenu.x
61 ae801529 2018-07-13 omar.polo
62 ae801529 2018-07-13 omar.polo **-y** *val*
63 ae801529 2018-07-13 omar.polo
64 ae801529 2018-07-13 omar.polo > Override the positioning on the Y axis, parsed as the resource MyMenu.y
65 ae801529 2018-07-13 omar.polo
66 ae801529 2018-07-13 omar.polo **-P** *padding*
67 ae801529 2018-07-13 omar.polo
68 ae801529 2018-07-13 omar.polo > Override the padding. See the MyMenu.padding resource.
69 ae801529 2018-07-13 omar.polo
70 ae801529 2018-07-13 omar.polo **-l** *layout*
71 ae801529 2018-07-13 omar.polo
72 ae801529 2018-07-13 omar.polo > Override the layout. Parsed as MyMenu.layout.
73 ae801529 2018-07-13 omar.polo
74 ae801529 2018-07-13 omar.polo **-f** *font*
75 ae801529 2018-07-13 omar.polo
76 ae801529 2018-07-13 omar.polo > Override the font. See MyMenu.font.
77 ae801529 2018-07-13 omar.polo
78 ae801529 2018-07-13 omar.polo **-w** *val*
79 ae801529 2018-07-13 omar.polo
80 ae801529 2018-07-13 omar.polo > Override the width. Parsed as MyMenu.width.
81 ae801529 2018-07-13 omar.polo
82 ae801529 2018-07-13 omar.polo **-h** *val*
83 ae801529 2018-07-13 omar.polo
84 ae801529 2018-07-13 omar.polo > Override the height. Parsed as MyMenu.height.
85 ae801529 2018-07-13 omar.polo
86 ae801529 2018-07-13 omar.polo **-b** *borders*
87 ae801529 2018-07-13 omar.polo
88 ae801529 2018-07-13 omar.polo > Override the borders size. Parsed as MyMenu.border.size.
89 ae801529 2018-07-13 omar.polo
90 ae801529 2018-07-13 omar.polo **-B** *colors*
91 ae801529 2018-07-13 omar.polo
92 ae801529 2018-07-13 omar.polo > Override the borders color. Parsed as MyMenu.border.color.
93 ae801529 2018-07-13 omar.polo
94 ae801529 2018-07-13 omar.polo **-t** *color*
95 ae801529 2018-07-13 omar.polo
96 ae801529 2018-07-13 omar.polo > Override the prompt foreground color. See MyMenu.prompt.foreground.
97 ae801529 2018-07-13 omar.polo
98 ae801529 2018-07-13 omar.polo **-T** *color*
99 ae801529 2018-07-13 omar.polo
100 ae801529 2018-07-13 omar.polo > Override the prompt background color. See MyMenu.prompt.background.
101 ae801529 2018-07-13 omar.polo
102 ae801529 2018-07-13 omar.polo **-c** *color*
103 ae801529 2018-07-13 omar.polo
104 ae801529 2018-07-13 omar.polo > Override the completion foreground color. See MyMenu.completion.foreground.
105 ae801529 2018-07-13 omar.polo
106 ae801529 2018-07-13 omar.polo **-C** *color*
107 ae801529 2018-07-13 omar.polo
108 ae801529 2018-07-13 omar.polo > Override the completion background color. See MyMenu.completion.background.
109 ae801529 2018-07-13 omar.polo
110 ae801529 2018-07-13 omar.polo **-s** *color*
111 ae801529 2018-07-13 omar.polo
112 ae801529 2018-07-13 omar.polo > Override the highlighted completion foreground color. See MyMenu.completion\_highlighted.foreground.
113 ae801529 2018-07-13 omar.polo
114 ae801529 2018-07-13 omar.polo **-S** *color*
115 ae801529 2018-07-13 omar.polo
116 ae801529 2018-07-13 omar.polo > Override the highlighted completion background color. See MyMenu.completion\_highlighted.background.
117 ae801529 2018-07-13 omar.polo
118 ae801529 2018-07-13 omar.polo # RESOURCES
119 ae801529 2018-07-13 omar.polo
120 0d0d65c9 2018-06-14 omar.polo MyMenu.font
121 0d0d65c9 2018-06-14 omar.polo
122 0d0d65c9 2018-06-14 omar.polo > The font name to use. By default is set to "fixed" if compiled without
123 0d0d65c9 2018-06-14 omar.polo > Xft(3) support, "monospace" otherwise. Without Xft(3) only bitmap font
124 0d0d65c9 2018-06-14 omar.polo > are supported.
125 0d0d65c9 2018-06-14 omar.polo
126 0d0d65c9 2018-06-14 omar.polo MyMenu.layout
127 0d0d65c9 2018-06-14 omar.polo
128 0d0d65c9 2018-06-14 omar.polo > The layout of the menu. The possible values are "horizontal" and
129 0d0d65c9 2018-06-14 omar.polo > "vertical", with the default being "horizontal". Every other value
130 0d0d65c9 2018-06-14 omar.polo > than "horizontal" is treated like "vertical", but this is kinda an
131 0d0d65c9 2018-06-14 omar.polo > implementation detail and not something to be relied on, since in the
132 0d0d65c9 2018-06-14 omar.polo > future other layout could be added as well.
133 0d0d65c9 2018-06-14 omar.polo
134 0d0d65c9 2018-06-14 omar.polo Mymenu.prompt
135 0d0d65c9 2018-06-14 omar.polo
136 0d0d65c9 2018-06-14 omar.polo > A string that is rendered before the user input. Default to "$ ".
137 0d0d65c9 2018-06-14 omar.polo
138 0d0d65c9 2018-06-14 omar.polo MyMenu.width
139 0d0d65c9 2018-06-14 omar.polo
140 0d0d65c9 2018-06-14 omar.polo > The width of the menu. If a numeric value is given (e.g. 400) is
141 0d0d65c9 2018-06-14 omar.polo > interpreted as pixel, if it ends with a percentage symbol \`%'
142 0d0d65c9 2018-06-14 omar.polo > (e.g. 40%) the relative percentage will be computed (relative to the
143 0d0d65c9 2018-06-14 omar.polo > monitor width).
144 0d0d65c9 2018-06-14 omar.polo
145 0d0d65c9 2018-06-14 omar.polo MyMenu.height
146 0d0d65c9 2018-06-14 omar.polo
147 0d0d65c9 2018-06-14 omar.polo > The height of the menu. Like MyMenu.width if a numeric value is given
148 0d0d65c9 2018-06-14 omar.polo > is interpreted as pixel, if it ends with a percentage symbol \`%' the
149 0d0d65c9 2018-06-14 omar.polo > relative percentage will be computed (relative to the monitor height).
150 0d0d65c9 2018-06-14 omar.polo
151 0d0d65c9 2018-06-14 omar.polo MyMenu.x
152 0d0d65c9 2018-06-14 omar.polo
153 0d0d65c9 2018-06-14 omar.polo > The X coordinate of the topmost left corner of the window. Much like
154 0d0d65c9 2018-06-14 omar.polo > MyMenu.height and MyMenu.width both a pixel dimension and percentage
155 ae801529 2018-07-13 omar.polo > could be supplied. In addition to it, some special value can be used.
156 0d0d65c9 2018-06-14 omar.polo
157 ae801529 2018-07-13 omar.polo > start
158 ae801529 2018-07-13 omar.polo
159 ae801529 2018-07-13 omar.polo > > Alias for 0;
160 ae801529 2018-07-13 omar.polo
161 ae801529 2018-07-13 omar.polo > middle
162 ae801529 2018-07-13 omar.polo
163 ae801529 2018-07-13 omar.polo > > Compute the correct value to make sure that mymenu will be
164 ae801529 2018-07-13 omar.polo > > horizontally centered;
165 ae801529 2018-07-13 omar.polo
166 ae801529 2018-07-13 omar.polo > end
167 ae801529 2018-07-13 omar.polo
168 ae801529 2018-07-13 omar.polo > > Compute the correct value to make sure that mymenu will be right
169 ae801529 2018-07-13 omar.polo > > aligned.
170 ae801529 2018-07-13 omar.polo
171 0d0d65c9 2018-06-14 omar.polo MyMenu.y
172 0d0d65c9 2018-06-14 omar.polo
173 0d0d65c9 2018-06-14 omar.polo > The Y coordinate of the topmost left corner of the window. Like the X
174 0d0d65c9 2018-06-14 omar.polo > coordinate a pixel dimension, percentage dimension or the special
175 ae801529 2018-07-13 omar.polo > value "start", "middle", "end" could be supplied.
176 0d0d65c9 2018-06-14 omar.polo
177 0d0d65c9 2018-06-14 omar.polo MyMenu.padding
178 0d0d65c9 2018-06-14 omar.polo
179 0d0d65c9 2018-06-14 omar.polo > Change the padding. In the horizontal layout the padding is the space
180 0d0d65c9 2018-06-14 omar.polo > between the rectangle of the completion and the text as well as the
181 0d0d65c9 2018-06-14 omar.polo > space between the prompt and the first completion. In the horizontal
182 0d0d65c9 2018-06-14 omar.polo > layout the padding is the horizontal spacing between the window edge
183 0d0d65c9 2018-06-14 omar.polo > and the text as well as the space up and down the text within the
184 0d0d65c9 2018-06-14 omar.polo > completion. The default value is 10.
185 0d0d65c9 2018-06-14 omar.polo
186 500ca6c1 2018-07-08 omar.polo MyMenu.border.size
187 500ca6c1 2018-07-08 omar.polo
188 500ca6c1 2018-07-08 omar.polo > A list of number separated by spaces to specify the border of the
189 500ca6c1 2018-07-08 omar.polo > window. The field is parsed like some CSS properties (i.e. padding),
190 500ca6c1 2018-07-08 omar.polo > that is: if only one value is provided then it'll be used for all
191 500ca6c1 2018-07-08 omar.polo > borders; if two value are given than the first will be used for the
192 500ca6c1 2018-07-08 omar.polo > top and bottom border and the former for the left and right border;
193 500ca6c1 2018-07-08 omar.polo > with three value the first is used for the top border, the second for
194 500ca6c1 2018-07-08 omar.polo > the left and right border and the third for the bottom border. If four
195 500ca6c1 2018-07-08 omar.polo > value are given, they'll be applied to the respective border
196 500ca6c1 2018-07-08 omar.polo > clockwise. Other values will be ignored. The default value is 0.
197 500ca6c1 2018-07-08 omar.polo
198 500ca6c1 2018-07-08 omar.polo MyMenu.border.color
199 500ca6c1 2018-07-08 omar.polo
200 500ca6c1 2018-07-08 omar.polo > A list of colors for the borders. This field is parsed like the
201 500ca6c1 2018-07-08 omar.polo > MyMenu.border.size. The default value is black.
202 500ca6c1 2018-07-08 omar.polo
203 0d0d65c9 2018-06-14 omar.polo MyMenu.prompt.background
204 0d0d65c9 2018-06-14 omar.polo
205 0d0d65c9 2018-06-14 omar.polo > The background of the prompt.
206 0d0d65c9 2018-06-14 omar.polo
207 0d0d65c9 2018-06-14 omar.polo MyMenu.prompt.foreground
208 0d0d65c9 2018-06-14 omar.polo
209 0d0d65c9 2018-06-14 omar.polo > The text color (foreground) of the prompt.
210 0d0d65c9 2018-06-14 omar.polo
211 0d0d65c9 2018-06-14 omar.polo MyMenu.completion.background
212 0d0d65c9 2018-06-14 omar.polo
213 0d0d65c9 2018-06-14 omar.polo > The background of the completions.
214 0d0d65c9 2018-06-14 omar.polo
215 0d0d65c9 2018-06-14 omar.polo MyMenu.completion.foreground
216 0d0d65c9 2018-06-14 omar.polo
217 0d0d65c9 2018-06-14 omar.polo > The text color of the completions.
218 0d0d65c9 2018-06-14 omar.polo
219 0d0d65c9 2018-06-14 omar.polo MyMenu.completion\_highlighted.background
220 0d0d65c9 2018-06-14 omar.polo
221 0d0d65c9 2018-06-14 omar.polo > The background of the selected completion.
222 0d0d65c9 2018-06-14 omar.polo
223 0d0d65c9 2018-06-14 omar.polo MyMenu.completion\_highlighted.foreground
224 0d0d65c9 2018-06-14 omar.polo
225 0d0d65c9 2018-06-14 omar.polo > The foreground of the selected completion.
226 0d0d65c9 2018-06-14 omar.polo
227 0d0d65c9 2018-06-14 omar.polo # KEYS
228 0d0d65c9 2018-06-14 omar.polo
229 bee0837c 2018-07-01 omar.polo This is the list of keybinding recognized by
230 bee0837c 2018-07-01 omar.polo **mymenu**.
231 bee0837c 2018-07-01 omar.polo In the following examples, C-c means Control-c.
232 bee0837c 2018-07-01 omar.polo
233 0d0d65c9 2018-06-14 omar.polo Esc
234 0d0d65c9 2018-06-14 omar.polo
235 0d0d65c9 2018-06-14 omar.polo > Close the menu without selecting any entry
236 0d0d65c9 2018-06-14 omar.polo
237 bee0837c 2018-07-01 omar.polo C-c
238 bee0837c 2018-07-01 omar.polo
239 bee0837c 2018-07-01 omar.polo > The same as Esc
240 bee0837c 2018-07-01 omar.polo
241 0d0d65c9 2018-06-14 omar.polo Enter
242 0d0d65c9 2018-06-14 omar.polo
243 0d0d65c9 2018-06-14 omar.polo > Close the menu and print to stdout what the user typed
244 0d0d65c9 2018-06-14 omar.polo
245 0d0d65c9 2018-06-14 omar.polo C-m
246 0d0d65c9 2018-06-14 omar.polo
247 0d0d65c9 2018-06-14 omar.polo > The same as Enter
248 0d0d65c9 2018-06-14 omar.polo
249 0d0d65c9 2018-06-14 omar.polo Tab
250 0d0d65c9 2018-06-14 omar.polo
251 0d0d65c9 2018-06-14 omar.polo > Expand the prompt to the next possible completion
252 0d0d65c9 2018-06-14 omar.polo
253 0d0d65c9 2018-06-14 omar.polo Shift Tab
254 0d0d65c9 2018-06-14 omar.polo
255 0d0d65c9 2018-06-14 omar.polo > Expand the prompt to the previous possible completion
256 0d0d65c9 2018-06-14 omar.polo
257 0d0d65c9 2018-06-14 omar.polo C-n
258 0d0d65c9 2018-06-14 omar.polo
259 0d0d65c9 2018-06-14 omar.polo > The same as Tab
260 0d0d65c9 2018-06-14 omar.polo
261 0d0d65c9 2018-06-14 omar.polo C-p
262 0d0d65c9 2018-06-14 omar.polo
263 0d0d65c9 2018-06-14 omar.polo > The same as Shift-Tab
264 0d0d65c9 2018-06-14 omar.polo
265 0d0d65c9 2018-06-14 omar.polo Backspace
266 0d0d65c9 2018-06-14 omar.polo
267 0d0d65c9 2018-06-14 omar.polo > Delete the last character
268 0d0d65c9 2018-06-14 omar.polo
269 0d0d65c9 2018-06-14 omar.polo C-h
270 0d0d65c9 2018-06-14 omar.polo
271 0d0d65c9 2018-06-14 omar.polo > The same as Backspace
272 0d0d65c9 2018-06-14 omar.polo
273 0d0d65c9 2018-06-14 omar.polo C-w
274 0d0d65c9 2018-06-14 omar.polo
275 0d0d65c9 2018-06-14 omar.polo > Delete the last word
276 0d0d65c9 2018-06-14 omar.polo
277 0d0d65c9 2018-06-14 omar.polo C-u
278 0d0d65c9 2018-06-14 omar.polo
279 0d0d65c9 2018-06-14 omar.polo > Delete the whole line
280 0d0d65c9 2018-06-14 omar.polo
281 6254fed8 2018-07-06 omar.polo C-i
282 6254fed8 2018-07-06 omar.polo
283 6254fed8 2018-07-06 omar.polo > Toggle the \`\`first selected'' style. Sometimes, especially with the -a
284 6254fed8 2018-07-06 omar.polo > option, could be handy to disable that behaviour. Let's say that
285 6254fed8 2018-07-06 omar.polo > you've typed \`\`fire'' and the first completion is \`\`firefox'' but you
286 6254fed8 2018-07-06 omar.polo > really want to choose \`\`fire''. While you can type some spaces, this
287 6254fed8 2018-07-06 omar.polo > keybinding is a more elegant way to change, at runtime, the behaviour
288 6254fed8 2018-07-06 omar.polo > of the first completion.
289 6254fed8 2018-07-06 omar.polo
290 0d0d65c9 2018-06-14 omar.polo # BUGS
291 0d0d65c9 2018-06-14 omar.polo
292 0d0d65c9 2018-06-14 omar.polo * If, instead of a numeric value, a not-valid number that terminates
293 0d0d65c9 2018-06-14 omar.polo with the % sign is supplied, then the default value for that field
294 0d0d65c9 2018-06-14 omar.polo will be treated as a percentage. Since this is a misuse of the
295 0d0d65c9 2018-06-14 omar.polo resources this behavior isn't strictly considered a bug.
296 0d0d65c9 2018-06-14 omar.polo
297 0d0d65c9 2018-06-14 omar.polo * C-w (delete last word) does not work well with multi-byte string. The
298 0d0d65c9 2018-06-14 omar.polo whole UTF-8 support is still kinda naïve and should be improved.
299 0d0d65c9 2018-06-14 omar.polo
300 ae801529 2018-07-13 omar.polo * Keep in mind that sometimes the order of the options matter. First are
301 ae801529 2018-07-13 omar.polo parsed (if any) the xrdb options, then the command line flags
302 ae801529 2018-07-13 omar.polo **in the provided order!**
303 ae801529 2018-07-13 omar.polo That meas that if you're providing first the x coordinate, let's say
304 ae801529 2018-07-13 omar.polo "middle", and
305 ae801529 2018-07-13 omar.polo **after that**
306 ae801529 2018-07-13 omar.polo you are overriding the width, the window
307 ae801529 2018-07-13 omar.polo **will not be**
308 ae801529 2018-07-13 omar.polo centered.
309 ae801529 2018-07-13 omar.polo
310 ae801529 2018-07-13 omar.polo As a general rule of thumb, if you're overriding the width and/or the
311 ae801529 2018-07-13 omar.polo height of the window, remember to override the x and y coordinates as
312 ae801529 2018-07-13 omar.polo well.
313 ae801529 2018-07-13 omar.polo
314 0d0d65c9 2018-06-14 omar.polo # EXIT STATUS
315 0d0d65c9 2018-06-14 omar.polo
316 0d0d65c9 2018-06-14 omar.polo 0 when the user select an entry, 1 when the user press Esc, EX\_USAGE
317 0d0d65c9 2018-06-14 omar.polo if used with wrong flags and EX\_UNAVAILABLE if the connection to X
318 0d0d65c9 2018-06-14 omar.polo fails.
319 0d0d65c9 2018-06-14 omar.polo
320 0d0d65c9 2018-06-14 omar.polo # SEE ALSO
321 0d0d65c9 2018-06-14 omar.polo
322 0d0d65c9 2018-06-14 omar.polo dmenu(1)
323 0d0d65c9 2018-06-14 omar.polo sysexits(3)
324 0d0d65c9 2018-06-14 omar.polo
325 0d0d65c9 2018-06-14 omar.polo # AUTHORS
326 0d0d65c9 2018-06-14 omar.polo
327 0d0d65c9 2018-06-14 omar.polo Omar Polo <omar.polo@europecom.net>
328 0d0d65c9 2018-06-14 omar.polo
329 ae801529 2018-07-13 omar.polo OpenBSD 6.3 - July 13, 2018