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 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*]
28 ae801529 2018-07-13 omar.polo
29 0d0d65c9 2018-06-14 omar.polo # DESCRIPTION
30 0d0d65c9 2018-06-14 omar.polo
31 0d0d65c9 2018-06-14 omar.polo The
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.
38 0d0d65c9 2018-06-14 omar.polo
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**
42 0d0d65c9 2018-06-14 omar.polo
43 0d0d65c9 2018-06-14 omar.polo **-h**
44 0d0d65c9 2018-06-14 omar.polo
45 0d0d65c9 2018-06-14 omar.polo > Print a small usage message to stderr.
46 0d0d65c9 2018-06-14 omar.polo
47 0d0d65c9 2018-06-14 omar.polo **-v**
48 0d0d65c9 2018-06-14 omar.polo
49 0d0d65c9 2018-06-14 omar.polo > Print version and exit.
50 0d0d65c9 2018-06-14 omar.polo
51 ae801529 2018-07-13 omar.polo **-a**
52 0d0d65c9 2018-06-14 omar.polo
53 ae801529 2018-07-13 omar.polo > The first completion (if any) is always selected. This is like dmenu.
54 0d0d65c9 2018-06-14 omar.polo
55 ae801529 2018-07-13 omar.polo **-p** *prompt*
56 ae801529 2018-07-13 omar.polo
57 ae801529 2018-07-13 omar.polo > Override the prompt
58 ae801529 2018-07-13 omar.polo
59 ae801529 2018-07-13 omar.polo **-x** *val*
60 ae801529 2018-07-13 omar.polo
61 ae801529 2018-07-13 omar.polo > Override the positioning on the X axis, parsed as the resource MyMenu.x
62 ae801529 2018-07-13 omar.polo
63 ae801529 2018-07-13 omar.polo **-y** *val*
64 ae801529 2018-07-13 omar.polo
65 ae801529 2018-07-13 omar.polo > Override the positioning on the Y axis, parsed as the resource MyMenu.y
66 ae801529 2018-07-13 omar.polo
67 ae801529 2018-07-13 omar.polo **-P** *padding*
68 ae801529 2018-07-13 omar.polo
69 ae801529 2018-07-13 omar.polo > Override the padding. See the MyMenu.padding resource.
70 ae801529 2018-07-13 omar.polo
71 ae801529 2018-07-13 omar.polo **-l** *layout*
72 ae801529 2018-07-13 omar.polo
73 ae801529 2018-07-13 omar.polo > Override the layout. Parsed as MyMenu.layout.
74 ae801529 2018-07-13 omar.polo
75 ae801529 2018-07-13 omar.polo **-f** *font*
76 ae801529 2018-07-13 omar.polo
77 ae801529 2018-07-13 omar.polo > Override the font. See MyMenu.font.
78 ae801529 2018-07-13 omar.polo
79 ae801529 2018-07-13 omar.polo **-w** *val*
80 ae801529 2018-07-13 omar.polo
81 ae801529 2018-07-13 omar.polo > Override the width. Parsed as MyMenu.width.
82 ae801529 2018-07-13 omar.polo
83 ae801529 2018-07-13 omar.polo **-h** *val*
84 ae801529 2018-07-13 omar.polo
85 ae801529 2018-07-13 omar.polo > Override the height. Parsed as MyMenu.height.
86 ae801529 2018-07-13 omar.polo
87 ae801529 2018-07-13 omar.polo **-b** *borders*
88 ae801529 2018-07-13 omar.polo
89 ae801529 2018-07-13 omar.polo > Override the borders size. Parsed as MyMenu.border.size.
90 ae801529 2018-07-13 omar.polo
91 ae801529 2018-07-13 omar.polo **-B** *colors*
92 ae801529 2018-07-13 omar.polo
93 ae801529 2018-07-13 omar.polo > Override the borders color. Parsed as MyMenu.border.color.
94 ae801529 2018-07-13 omar.polo
95 ae801529 2018-07-13 omar.polo **-t** *color*
96 ae801529 2018-07-13 omar.polo
97 ae801529 2018-07-13 omar.polo > Override the prompt foreground color. See MyMenu.prompt.foreground.
98 ae801529 2018-07-13 omar.polo
99 ae801529 2018-07-13 omar.polo **-T** *color*
100 ae801529 2018-07-13 omar.polo
101 ae801529 2018-07-13 omar.polo > Override the prompt background color. See MyMenu.prompt.background.
102 ae801529 2018-07-13 omar.polo
103 ae801529 2018-07-13 omar.polo **-c** *color*
104 ae801529 2018-07-13 omar.polo
105 ae801529 2018-07-13 omar.polo > Override the completion foreground color. See MyMenu.completion.foreground.
106 ae801529 2018-07-13 omar.polo
107 ae801529 2018-07-13 omar.polo **-C** *color*
108 ae801529 2018-07-13 omar.polo
109 ae801529 2018-07-13 omar.polo > Override the completion background color. See MyMenu.completion.background.
110 ae801529 2018-07-13 omar.polo
111 ae801529 2018-07-13 omar.polo **-s** *color*
112 ae801529 2018-07-13 omar.polo
113 ae801529 2018-07-13 omar.polo > Override the highlighted completion foreground color. See MyMenu.completion\_highlighted.foreground.
114 ae801529 2018-07-13 omar.polo
115 ae801529 2018-07-13 omar.polo **-S** *color*
116 ae801529 2018-07-13 omar.polo
117 ae801529 2018-07-13 omar.polo > Override the highlighted completion background color. See MyMenu.completion\_highlighted.background.
118 ae801529 2018-07-13 omar.polo
119 844addbb 2018-07-15 omar.polo **-w** *window*
120 844addbb 2018-07-15 omar.polo
121 844addbb 2018-07-15 omar.polo > Embed into the given window id.
122 844addbb 2018-07-15 omar.polo
123 ae801529 2018-07-13 omar.polo # RESOURCES
124 ae801529 2018-07-13 omar.polo
125 0d0d65c9 2018-06-14 omar.polo MyMenu.font
126 0d0d65c9 2018-06-14 omar.polo
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.
130 0d0d65c9 2018-06-14 omar.polo
131 0d0d65c9 2018-06-14 omar.polo MyMenu.layout
132 0d0d65c9 2018-06-14 omar.polo
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.
138 0d0d65c9 2018-06-14 omar.polo
139 0d0d65c9 2018-06-14 omar.polo Mymenu.prompt
140 0d0d65c9 2018-06-14 omar.polo
141 0d0d65c9 2018-06-14 omar.polo > A string that is rendered before the user input. Default to "$ ".
142 0d0d65c9 2018-06-14 omar.polo
143 0d0d65c9 2018-06-14 omar.polo MyMenu.width
144 0d0d65c9 2018-06-14 omar.polo
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).
149 0d0d65c9 2018-06-14 omar.polo
150 0d0d65c9 2018-06-14 omar.polo MyMenu.height
151 0d0d65c9 2018-06-14 omar.polo
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).
155 0d0d65c9 2018-06-14 omar.polo
156 0d0d65c9 2018-06-14 omar.polo MyMenu.x
157 0d0d65c9 2018-06-14 omar.polo
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.
161 0d0d65c9 2018-06-14 omar.polo
162 ae801529 2018-07-13 omar.polo > start
163 ae801529 2018-07-13 omar.polo
164 ae801529 2018-07-13 omar.polo > > Alias for 0;
165 ae801529 2018-07-13 omar.polo
166 ae801529 2018-07-13 omar.polo > middle
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
169 ae801529 2018-07-13 omar.polo > > horizontally centered;
170 ae801529 2018-07-13 omar.polo
171 ae801529 2018-07-13 omar.polo > end
172 ae801529 2018-07-13 omar.polo
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.
175 ae801529 2018-07-13 omar.polo
176 0d0d65c9 2018-06-14 omar.polo MyMenu.y
177 0d0d65c9 2018-06-14 omar.polo
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.
181 0d0d65c9 2018-06-14 omar.polo
182 0d0d65c9 2018-06-14 omar.polo MyMenu.padding
183 0d0d65c9 2018-06-14 omar.polo
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.
190 0d0d65c9 2018-06-14 omar.polo
191 500ca6c1 2018-07-08 omar.polo MyMenu.border.size
192 500ca6c1 2018-07-08 omar.polo
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.
202 500ca6c1 2018-07-08 omar.polo
203 500ca6c1 2018-07-08 omar.polo MyMenu.border.color
204 500ca6c1 2018-07-08 omar.polo
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.
207 500ca6c1 2018-07-08 omar.polo
208 0d0d65c9 2018-06-14 omar.polo MyMenu.prompt.background
209 0d0d65c9 2018-06-14 omar.polo
210 0d0d65c9 2018-06-14 omar.polo > The background of the prompt.
211 0d0d65c9 2018-06-14 omar.polo
212 0d0d65c9 2018-06-14 omar.polo MyMenu.prompt.foreground
213 0d0d65c9 2018-06-14 omar.polo
214 0d0d65c9 2018-06-14 omar.polo > The text color (foreground) of the prompt.
215 0d0d65c9 2018-06-14 omar.polo
216 0d0d65c9 2018-06-14 omar.polo MyMenu.completion.background
217 0d0d65c9 2018-06-14 omar.polo
218 0d0d65c9 2018-06-14 omar.polo > The background of the completions.
219 0d0d65c9 2018-06-14 omar.polo
220 0d0d65c9 2018-06-14 omar.polo MyMenu.completion.foreground
221 0d0d65c9 2018-06-14 omar.polo
222 0d0d65c9 2018-06-14 omar.polo > The text color of the completions.
223 0d0d65c9 2018-06-14 omar.polo
224 0d0d65c9 2018-06-14 omar.polo MyMenu.completion\_highlighted.background
225 0d0d65c9 2018-06-14 omar.polo
226 0d0d65c9 2018-06-14 omar.polo > The background of the selected completion.
227 0d0d65c9 2018-06-14 omar.polo
228 0d0d65c9 2018-06-14 omar.polo MyMenu.completion\_highlighted.foreground
229 0d0d65c9 2018-06-14 omar.polo
230 0d0d65c9 2018-06-14 omar.polo > The foreground of the selected completion.
231 0d0d65c9 2018-06-14 omar.polo
232 0d0d65c9 2018-06-14 omar.polo # KEYS
233 0d0d65c9 2018-06-14 omar.polo
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.
237 bee0837c 2018-07-01 omar.polo
238 0d0d65c9 2018-06-14 omar.polo Esc
239 0d0d65c9 2018-06-14 omar.polo
240 0d0d65c9 2018-06-14 omar.polo > Close the menu without selecting any entry
241 0d0d65c9 2018-06-14 omar.polo
242 bee0837c 2018-07-01 omar.polo C-c
243 bee0837c 2018-07-01 omar.polo
244 bee0837c 2018-07-01 omar.polo > The same as Esc
245 bee0837c 2018-07-01 omar.polo
246 0d0d65c9 2018-06-14 omar.polo Enter
247 0d0d65c9 2018-06-14 omar.polo
248 0d0d65c9 2018-06-14 omar.polo > Close the menu and print to stdout what the user typed
249 0d0d65c9 2018-06-14 omar.polo
250 0d0d65c9 2018-06-14 omar.polo C-m
251 0d0d65c9 2018-06-14 omar.polo
252 0d0d65c9 2018-06-14 omar.polo > The same as Enter
253 0d0d65c9 2018-06-14 omar.polo
254 0d0d65c9 2018-06-14 omar.polo Tab
255 0d0d65c9 2018-06-14 omar.polo
256 0d0d65c9 2018-06-14 omar.polo > Expand the prompt to the next possible completion
257 0d0d65c9 2018-06-14 omar.polo
258 0d0d65c9 2018-06-14 omar.polo Shift Tab
259 0d0d65c9 2018-06-14 omar.polo
260 0d0d65c9 2018-06-14 omar.polo > Expand the prompt to the previous possible completion
261 0d0d65c9 2018-06-14 omar.polo
262 0d0d65c9 2018-06-14 omar.polo C-n
263 0d0d65c9 2018-06-14 omar.polo
264 0d0d65c9 2018-06-14 omar.polo > The same as Tab
265 0d0d65c9 2018-06-14 omar.polo
266 0d0d65c9 2018-06-14 omar.polo C-p
267 0d0d65c9 2018-06-14 omar.polo
268 0d0d65c9 2018-06-14 omar.polo > The same as Shift-Tab
269 0d0d65c9 2018-06-14 omar.polo
270 0d0d65c9 2018-06-14 omar.polo Backspace
271 0d0d65c9 2018-06-14 omar.polo
272 0d0d65c9 2018-06-14 omar.polo > Delete the last character
273 0d0d65c9 2018-06-14 omar.polo
274 0d0d65c9 2018-06-14 omar.polo C-h
275 0d0d65c9 2018-06-14 omar.polo
276 0d0d65c9 2018-06-14 omar.polo > The same as Backspace
277 0d0d65c9 2018-06-14 omar.polo
278 0d0d65c9 2018-06-14 omar.polo C-w
279 0d0d65c9 2018-06-14 omar.polo
280 0d0d65c9 2018-06-14 omar.polo > Delete the last word
281 0d0d65c9 2018-06-14 omar.polo
282 0d0d65c9 2018-06-14 omar.polo C-u
283 0d0d65c9 2018-06-14 omar.polo
284 0d0d65c9 2018-06-14 omar.polo > Delete the whole line
285 0d0d65c9 2018-06-14 omar.polo
286 6254fed8 2018-07-06 omar.polo C-i
287 6254fed8 2018-07-06 omar.polo
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.
294 6254fed8 2018-07-06 omar.polo
295 0d0d65c9 2018-06-14 omar.polo # BUGS
296 0d0d65c9 2018-06-14 omar.polo
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.
301 0d0d65c9 2018-06-14 omar.polo
302 0d0d65c9 2018-06-14 omar.polo * C-w (delete last word) does not work well with multi-byte string. The
303 0d0d65c9 2018-06-14 omar.polo whole UTF-8 support is still kinda naïve and should be improved.
304 0d0d65c9 2018-06-14 omar.polo
305 ae801529 2018-07-13 omar.polo * Keep in mind that sometimes the order of the options matter. First are
306 ae801529 2018-07-13 omar.polo parsed (if any) the xrdb options, then the command line flags
307 ae801529 2018-07-13 omar.polo **in the provided order!**
308 ae801529 2018-07-13 omar.polo That meas that if you're providing first the x coordinate, let's say
309 ae801529 2018-07-13 omar.polo "middle", and
310 ae801529 2018-07-13 omar.polo **after that**
311 ae801529 2018-07-13 omar.polo you are overriding the width, the window
312 ae801529 2018-07-13 omar.polo **will not be**
313 ae801529 2018-07-13 omar.polo centered.
314 ae801529 2018-07-13 omar.polo
315 ae801529 2018-07-13 omar.polo As a general rule of thumb, if you're overriding the width and/or the
316 ae801529 2018-07-13 omar.polo height of the window, remember to override the x and y coordinates as
317 ae801529 2018-07-13 omar.polo well.
318 ae801529 2018-07-13 omar.polo
319 0d0d65c9 2018-06-14 omar.polo # EXIT STATUS
320 0d0d65c9 2018-06-14 omar.polo
321 0d0d65c9 2018-06-14 omar.polo 0 when the user select an entry, 1 when the user press Esc, EX\_USAGE
322 0d0d65c9 2018-06-14 omar.polo if used with wrong flags and EX\_UNAVAILABLE if the connection to X
323 0d0d65c9 2018-06-14 omar.polo fails.
324 0d0d65c9 2018-06-14 omar.polo
325 0d0d65c9 2018-06-14 omar.polo # SEE ALSO
326 0d0d65c9 2018-06-14 omar.polo
327 0d0d65c9 2018-06-14 omar.polo dmenu(1)
328 0d0d65c9 2018-06-14 omar.polo sysexits(3)
329 0d0d65c9 2018-06-14 omar.polo
330 0d0d65c9 2018-06-14 omar.polo # AUTHORS
331 0d0d65c9 2018-06-14 omar.polo
332 0d0d65c9 2018-06-14 omar.polo Omar Polo <omar.polo@europecom.net>
333 0d0d65c9 2018-06-14 omar.polo
334 844addbb 2018-07-15 omar.polo OpenBSD 6.3 - July 15, 2018