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 0dee1b65 2018-08-13 omar.polo \[**-Aamvh**]
11 54fabaa4 2018-09-16 omar.polo \[**-B** *colors*]
12 54fabaa4 2018-09-16 omar.polo \[**-b** *borders*]
13 54fabaa4 2018-09-16 omar.polo \[**-C** *color*]
14 54fabaa4 2018-09-16 omar.polo \[**-c** *color*]
15 54fabaa4 2018-09-16 omar.polo \[**-d** *separator*]
16 54fabaa4 2018-09-16 omar.polo \[**-e** *window*]
17 54fabaa4 2018-09-16 omar.polo \[**-f** *font*]
18 844addbb 2018-07-15 omar.polo \[**-H** *height*]
19 ae801529 2018-07-13 omar.polo \[**-l** *layout*]
20 54fabaa4 2018-09-16 omar.polo \[**-P** *padding*]
21 54fabaa4 2018-09-16 omar.polo \[**-p** *prompt*]
22 ae801529 2018-07-13 omar.polo \[**-T** *color*]
23 54fabaa4 2018-09-16 omar.polo \[**-t** *color*]
24 ae801529 2018-07-13 omar.polo \[**-S** *color*]
25 54fabaa4 2018-09-16 omar.polo \[**-s** *color*]
26 54fabaa4 2018-09-16 omar.polo \[**-W** *width*]
27 54fabaa4 2018-09-16 omar.polo \[**-x** *coord*]
28 54fabaa4 2018-09-16 omar.polo \[**-y** *coord*]
29 ae801529 2018-07-13 omar.polo
30 0d0d65c9 2018-06-14 omar.polo # DESCRIPTION
31 0d0d65c9 2018-06-14 omar.polo
32 0d0d65c9 2018-06-14 omar.polo The
33 0d0d65c9 2018-06-14 omar.polo **mymenu**
34 0d0d65c9 2018-06-14 omar.polo utility a simple graphical menu for XOrg. It read the items from
35 0d0d65c9 2018-06-14 omar.polo **stdin**
36 0d0d65c9 2018-06-14 omar.polo and print the user selection to
37 0d0d65c9 2018-06-14 omar.polo **stdout**
38 0d0d65c9 2018-06-14 omar.polo on exit.
39 0d0d65c9 2018-06-14 omar.polo
40 ae801529 2018-07-13 omar.polo The following options are available and take the maximum precedence
41 ae801529 2018-07-13 omar.polo over the (respective) ones defined in the
42 ae801529 2018-07-13 omar.polo **X Resource Database**
43 0d0d65c9 2018-06-14 omar.polo
44 54fabaa4 2018-09-16 omar.polo **-A**
45 0d0d65c9 2018-06-14 omar.polo
46 54fabaa4 2018-09-16 omar.polo > The user must chose one of the option (or none) and is not able to
47 54fabaa4 2018-09-16 omar.polo > arbitrary enter text
48 0d0d65c9 2018-06-14 omar.polo
49 ae801529 2018-07-13 omar.polo **-a**
50 0d0d65c9 2018-06-14 omar.polo
51 ae801529 2018-07-13 omar.polo > The first completion (if any) is always selected. This is like dmenu.
52 0d0d65c9 2018-06-14 omar.polo
53 54fabaa4 2018-09-16 omar.polo **-B** *colors*
54 3518f203 2018-07-21 omar.polo
55 54fabaa4 2018-09-16 omar.polo > Override the borders color. Parsed as MyMenu.border.color.
56 3518f203 2018-07-21 omar.polo
57 54fabaa4 2018-09-16 omar.polo **-b** *borders*
58 0dee1b65 2018-08-13 omar.polo
59 54fabaa4 2018-09-16 omar.polo > Override the borders size. Parsed as MyMenu.border.size.
60 0dee1b65 2018-08-13 omar.polo
61 54fabaa4 2018-09-16 omar.polo **-C** *color*
62 ae801529 2018-07-13 omar.polo
63 54fabaa4 2018-09-16 omar.polo > Override the completion background color. See
64 54fabaa4 2018-09-16 omar.polo > MyMenu.completion.background.
65 ae801529 2018-07-13 omar.polo
66 54fabaa4 2018-09-16 omar.polo **-c** *color*
67 ae801529 2018-07-13 omar.polo
68 54fabaa4 2018-09-16 omar.polo > Override the completion foreground color. See
69 54fabaa4 2018-09-16 omar.polo > MyMenu.completion.foreground.
70 ae801529 2018-07-13 omar.polo
71 54fabaa4 2018-09-16 omar.polo **-d** *separator*
72 ae801529 2018-07-13 omar.polo
73 54fabaa4 2018-09-16 omar.polo > Define a string to be used as a separator. Only the text after the
74 54fabaa4 2018-09-16 omar.polo > separator will be rendered, but the original string will be
75 54fabaa4 2018-09-16 omar.polo > returned. Useful to embed custom data on every entry. See the mpd
76 54fabaa4 2018-09-16 omar.polo > example for hints on how this can be useful.
77 ae801529 2018-07-13 omar.polo
78 54fabaa4 2018-09-16 omar.polo **-e** *windowid*
79 ae801529 2018-07-13 omar.polo
80 54fabaa4 2018-09-16 omar.polo > Embed into the given window id.
81 ae801529 2018-07-13 omar.polo
82 54fabaa4 2018-09-16 omar.polo **-H** *val*
83 ae801529 2018-07-13 omar.polo
84 54fabaa4 2018-09-16 omar.polo > Override the height. Parsed as MyMenu.height.
85 ae801529 2018-07-13 omar.polo
86 54fabaa4 2018-09-16 omar.polo **-h**
87 54fabaa4 2018-09-16 omar.polo
88 54fabaa4 2018-09-16 omar.polo > Print a small usage message to stderr.
89 54fabaa4 2018-09-16 omar.polo
90 ae801529 2018-07-13 omar.polo **-f** *font*
91 ae801529 2018-07-13 omar.polo
92 ae801529 2018-07-13 omar.polo > Override the font. See MyMenu.font.
93 ae801529 2018-07-13 omar.polo
94 54fabaa4 2018-09-16 omar.polo **-l** *layout*
95 ae801529 2018-07-13 omar.polo
96 54fabaa4 2018-09-16 omar.polo > Override the layout. Parsed as MyMenu.layout.
97 ae801529 2018-07-13 omar.polo
98 54fabaa4 2018-09-16 omar.polo **-m**
99 ae801529 2018-07-13 omar.polo
100 54fabaa4 2018-09-16 omar.polo > The user can select multiple entry via C-m. Please consult
101 845963e5 2018-09-16 omar.polo > *KEYS*
102 845963e5 2018-09-16 omar.polo > for more info.
103 ae801529 2018-07-13 omar.polo
104 54fabaa4 2018-09-16 omar.polo **-P** *padding*
105 ae801529 2018-07-13 omar.polo
106 54fabaa4 2018-09-16 omar.polo > Override the padding. See the MyMenu.padding resource.
107 ae801529 2018-07-13 omar.polo
108 54fabaa4 2018-09-16 omar.polo **-p** *prompt*
109 ae801529 2018-07-13 omar.polo
110 54fabaa4 2018-09-16 omar.polo > Override the prompt
111 ae801529 2018-07-13 omar.polo
112 54fabaa4 2018-09-16 omar.polo **-S** *color*
113 ae801529 2018-07-13 omar.polo
114 54fabaa4 2018-09-16 omar.polo > Override the highlighted completion background color. See
115 54fabaa4 2018-09-16 omar.polo > MyMenu.completion\_highlighted.background.
116 ae801529 2018-07-13 omar.polo
117 54fabaa4 2018-09-16 omar.polo **-s** *color*
118 54fabaa4 2018-09-16 omar.polo
119 54fabaa4 2018-09-16 omar.polo > Override the highlighted completion foreground color. See
120 54fabaa4 2018-09-16 omar.polo > MyMenu.completion\_highlighted.foreground.
121 54fabaa4 2018-09-16 omar.polo
122 ae801529 2018-07-13 omar.polo **-T** *color*
123 ae801529 2018-07-13 omar.polo
124 ae801529 2018-07-13 omar.polo > Override the prompt background color. See MyMenu.prompt.background.
125 ae801529 2018-07-13 omar.polo
126 54fabaa4 2018-09-16 omar.polo **-t** *color*
127 ae801529 2018-07-13 omar.polo
128 54fabaa4 2018-09-16 omar.polo > Override the prompt foreground color. See MyMenu.prompt.foreground.
129 ae801529 2018-07-13 omar.polo
130 54fabaa4 2018-09-16 omar.polo **-v**
131 ae801529 2018-07-13 omar.polo
132 54fabaa4 2018-09-16 omar.polo > Print version and exit.
133 ae801529 2018-07-13 omar.polo
134 54fabaa4 2018-09-16 omar.polo **-W** *val*
135 ae801529 2018-07-13 omar.polo
136 54fabaa4 2018-09-16 omar.polo > Override the width. Parsed as MyMenu.width.
137 ae801529 2018-07-13 omar.polo
138 54fabaa4 2018-09-16 omar.polo **-x** *val*
139 ae801529 2018-07-13 omar.polo
140 54fabaa4 2018-09-16 omar.polo > Override the positioning on the X axis, parsed as the resource MyMenu.x
141 ae801529 2018-07-13 omar.polo
142 54fabaa4 2018-09-16 omar.polo **-y** *val*
143 844addbb 2018-07-15 omar.polo
144 54fabaa4 2018-09-16 omar.polo > Override the positioning on the Y axis, parsed as the resource MyMenu.y
145 844addbb 2018-07-15 omar.polo
146 ae801529 2018-07-13 omar.polo # RESOURCES
147 ae801529 2018-07-13 omar.polo
148 0d0d65c9 2018-06-14 omar.polo MyMenu.font
149 0d0d65c9 2018-06-14 omar.polo
150 0d0d65c9 2018-06-14 omar.polo > The font name to use. By default is set to "fixed" if compiled without
151 0d0d65c9 2018-06-14 omar.polo > Xft(3) support, "monospace" otherwise. Without Xft(3) only bitmap font
152 0d0d65c9 2018-06-14 omar.polo > are supported.
153 0d0d65c9 2018-06-14 omar.polo
154 0d0d65c9 2018-06-14 omar.polo MyMenu.layout
155 0d0d65c9 2018-06-14 omar.polo
156 0d0d65c9 2018-06-14 omar.polo > The layout of the menu. The possible values are "horizontal" and
157 0d0d65c9 2018-06-14 omar.polo > "vertical", with the default being "horizontal". Every other value
158 0d0d65c9 2018-06-14 omar.polo > than "horizontal" is treated like "vertical", but this is kinda an
159 0d0d65c9 2018-06-14 omar.polo > implementation detail and not something to be relied on, since in the
160 0d0d65c9 2018-06-14 omar.polo > future other layout could be added as well.
161 0d0d65c9 2018-06-14 omar.polo
162 0d0d65c9 2018-06-14 omar.polo Mymenu.prompt
163 0d0d65c9 2018-06-14 omar.polo
164 0d0d65c9 2018-06-14 omar.polo > A string that is rendered before the user input. Default to "$ ".
165 0d0d65c9 2018-06-14 omar.polo
166 0d0d65c9 2018-06-14 omar.polo MyMenu.width
167 0d0d65c9 2018-06-14 omar.polo
168 0d0d65c9 2018-06-14 omar.polo > The width of the menu. If a numeric value is given (e.g. 400) is
169 0d0d65c9 2018-06-14 omar.polo > interpreted as pixel, if it ends with a percentage symbol \`%'
170 0d0d65c9 2018-06-14 omar.polo > (e.g. 40%) the relative percentage will be computed (relative to the
171 0d0d65c9 2018-06-14 omar.polo > monitor width).
172 0d0d65c9 2018-06-14 omar.polo
173 0d0d65c9 2018-06-14 omar.polo MyMenu.height
174 0d0d65c9 2018-06-14 omar.polo
175 0d0d65c9 2018-06-14 omar.polo > The height of the menu. Like MyMenu.width if a numeric value is given
176 0d0d65c9 2018-06-14 omar.polo > is interpreted as pixel, if it ends with a percentage symbol \`%' the
177 0d0d65c9 2018-06-14 omar.polo > relative percentage will be computed (relative to the monitor height).
178 0d0d65c9 2018-06-14 omar.polo
179 0d0d65c9 2018-06-14 omar.polo MyMenu.x
180 0d0d65c9 2018-06-14 omar.polo
181 0d0d65c9 2018-06-14 omar.polo > The X coordinate of the topmost left corner of the window. Much like
182 0d0d65c9 2018-06-14 omar.polo > MyMenu.height and MyMenu.width both a pixel dimension and percentage
183 ae801529 2018-07-13 omar.polo > could be supplied. In addition to it, some special value can be used.
184 0d0d65c9 2018-06-14 omar.polo
185 ae801529 2018-07-13 omar.polo > start
186 ae801529 2018-07-13 omar.polo
187 ae801529 2018-07-13 omar.polo > > Alias for 0;
188 ae801529 2018-07-13 omar.polo
189 ae801529 2018-07-13 omar.polo > middle
190 ae801529 2018-07-13 omar.polo
191 ae801529 2018-07-13 omar.polo > > Compute the correct value to make sure that mymenu will be
192 ae801529 2018-07-13 omar.polo > > horizontally centered;
193 ae801529 2018-07-13 omar.polo
194 ae801529 2018-07-13 omar.polo > end
195 ae801529 2018-07-13 omar.polo
196 ae801529 2018-07-13 omar.polo > > Compute the correct value to make sure that mymenu will be right
197 ae801529 2018-07-13 omar.polo > > aligned.
198 ae801529 2018-07-13 omar.polo
199 0d0d65c9 2018-06-14 omar.polo MyMenu.y
200 0d0d65c9 2018-06-14 omar.polo
201 0d0d65c9 2018-06-14 omar.polo > The Y coordinate of the topmost left corner of the window. Like the X
202 0d0d65c9 2018-06-14 omar.polo > coordinate a pixel dimension, percentage dimension or the special
203 ae801529 2018-07-13 omar.polo > value "start", "middle", "end" could be supplied.
204 0d0d65c9 2018-06-14 omar.polo
205 0d0d65c9 2018-06-14 omar.polo MyMenu.padding
206 0d0d65c9 2018-06-14 omar.polo
207 0d0d65c9 2018-06-14 omar.polo > Change the padding. In the horizontal layout the padding is the space
208 0d0d65c9 2018-06-14 omar.polo > between the rectangle of the completion and the text as well as the
209 0d0d65c9 2018-06-14 omar.polo > space between the prompt and the first completion. In the horizontal
210 0d0d65c9 2018-06-14 omar.polo > layout the padding is the horizontal spacing between the window edge
211 0d0d65c9 2018-06-14 omar.polo > and the text as well as the space up and down the text within the
212 0d0d65c9 2018-06-14 omar.polo > completion. The default value is 10.
213 0d0d65c9 2018-06-14 omar.polo
214 500ca6c1 2018-07-08 omar.polo MyMenu.border.size
215 500ca6c1 2018-07-08 omar.polo
216 500ca6c1 2018-07-08 omar.polo > A list of number separated by spaces to specify the border of the
217 500ca6c1 2018-07-08 omar.polo > window. The field is parsed like some CSS properties (i.e. padding),
218 500ca6c1 2018-07-08 omar.polo > that is: if only one value is provided then it'll be used for all
219 500ca6c1 2018-07-08 omar.polo > borders; if two value are given than the first will be used for the
220 500ca6c1 2018-07-08 omar.polo > top and bottom border and the former for the left and right border;
221 500ca6c1 2018-07-08 omar.polo > with three value the first is used for the top border, the second for
222 500ca6c1 2018-07-08 omar.polo > the left and right border and the third for the bottom border. If four
223 500ca6c1 2018-07-08 omar.polo > value are given, they'll be applied to the respective border
224 500ca6c1 2018-07-08 omar.polo > clockwise. Other values will be ignored. The default value is 0.
225 500ca6c1 2018-07-08 omar.polo
226 500ca6c1 2018-07-08 omar.polo MyMenu.border.color
227 500ca6c1 2018-07-08 omar.polo
228 500ca6c1 2018-07-08 omar.polo > A list of colors for the borders. This field is parsed like the
229 500ca6c1 2018-07-08 omar.polo > MyMenu.border.size. The default value is black.
230 500ca6c1 2018-07-08 omar.polo
231 0d0d65c9 2018-06-14 omar.polo MyMenu.prompt.background
232 0d0d65c9 2018-06-14 omar.polo
233 0d0d65c9 2018-06-14 omar.polo > The background of the prompt.
234 0d0d65c9 2018-06-14 omar.polo
235 0d0d65c9 2018-06-14 omar.polo MyMenu.prompt.foreground
236 0d0d65c9 2018-06-14 omar.polo
237 0d0d65c9 2018-06-14 omar.polo > The text color (foreground) of the prompt.
238 0d0d65c9 2018-06-14 omar.polo
239 0d0d65c9 2018-06-14 omar.polo MyMenu.completion.background
240 0d0d65c9 2018-06-14 omar.polo
241 0d0d65c9 2018-06-14 omar.polo > The background of the completions.
242 0d0d65c9 2018-06-14 omar.polo
243 0d0d65c9 2018-06-14 omar.polo MyMenu.completion.foreground
244 0d0d65c9 2018-06-14 omar.polo
245 0d0d65c9 2018-06-14 omar.polo > The text color of the completions.
246 0d0d65c9 2018-06-14 omar.polo
247 0d0d65c9 2018-06-14 omar.polo MyMenu.completion\_highlighted.background
248 0d0d65c9 2018-06-14 omar.polo
249 0d0d65c9 2018-06-14 omar.polo > The background of the selected completion.
250 0d0d65c9 2018-06-14 omar.polo
251 0d0d65c9 2018-06-14 omar.polo MyMenu.completion\_highlighted.foreground
252 0d0d65c9 2018-06-14 omar.polo
253 0d0d65c9 2018-06-14 omar.polo > The foreground of the selected completion.
254 0d0d65c9 2018-06-14 omar.polo
255 54fabaa4 2018-09-16 omar.polo # COLORS
256 54fabaa4 2018-09-16 omar.polo
257 54fabaa4 2018-09-16 omar.polo MyMenu accept colors only in the form of:
258 54fabaa4 2018-09-16 omar.polo
259 54fabaa4 2018-09-16 omar.polo * #rgb
260 54fabaa4 2018-09-16 omar.polo
261 54fabaa4 2018-09-16 omar.polo * #rrggbb
262 54fabaa4 2018-09-16 omar.polo
263 54fabaa4 2018-09-16 omar.polo * #aarrggbb
264 54fabaa4 2018-09-16 omar.polo
265 54fabaa4 2018-09-16 omar.polo The opacity is assumed 0xff (no transparency) if not provided.
266 54fabaa4 2018-09-16 omar.polo
267 0d0d65c9 2018-06-14 omar.polo # KEYS
268 0d0d65c9 2018-06-14 omar.polo
269 bee0837c 2018-07-01 omar.polo This is the list of keybinding recognized by
270 bee0837c 2018-07-01 omar.polo **mymenu**.
271 bee0837c 2018-07-01 omar.polo In the following examples, C-c means Control-c.
272 bee0837c 2018-07-01 omar.polo
273 0d0d65c9 2018-06-14 omar.polo Esc
274 0d0d65c9 2018-06-14 omar.polo
275 0d0d65c9 2018-06-14 omar.polo > Close the menu without selecting any entry
276 0d0d65c9 2018-06-14 omar.polo
277 bee0837c 2018-07-01 omar.polo C-c
278 bee0837c 2018-07-01 omar.polo
279 bee0837c 2018-07-01 omar.polo > The same as Esc
280 bee0837c 2018-07-01 omar.polo
281 0d0d65c9 2018-06-14 omar.polo Enter
282 0d0d65c9 2018-06-14 omar.polo
283 0d0d65c9 2018-06-14 omar.polo > Close the menu and print to stdout what the user typed
284 0d0d65c9 2018-06-14 omar.polo
285 0d0d65c9 2018-06-14 omar.polo C-m
286 0d0d65c9 2018-06-14 omar.polo
287 0dee1b65 2018-08-13 omar.polo > Confirm but keep looping (if enabled), otherwise complete only
288 0d0d65c9 2018-06-14 omar.polo
289 0d0d65c9 2018-06-14 omar.polo Tab
290 0d0d65c9 2018-06-14 omar.polo
291 0d0d65c9 2018-06-14 omar.polo > Expand the prompt to the next possible completion
292 0d0d65c9 2018-06-14 omar.polo
293 0d0d65c9 2018-06-14 omar.polo Shift Tab
294 0d0d65c9 2018-06-14 omar.polo
295 0d0d65c9 2018-06-14 omar.polo > Expand the prompt to the previous possible completion
296 0d0d65c9 2018-06-14 omar.polo
297 0d0d65c9 2018-06-14 omar.polo C-n
298 0d0d65c9 2018-06-14 omar.polo
299 0d0d65c9 2018-06-14 omar.polo > The same as Tab
300 0d0d65c9 2018-06-14 omar.polo
301 0d0d65c9 2018-06-14 omar.polo C-p
302 0d0d65c9 2018-06-14 omar.polo
303 0d0d65c9 2018-06-14 omar.polo > The same as Shift-Tab
304 0d0d65c9 2018-06-14 omar.polo
305 0d0d65c9 2018-06-14 omar.polo Backspace
306 0d0d65c9 2018-06-14 omar.polo
307 0d0d65c9 2018-06-14 omar.polo > Delete the last character
308 0d0d65c9 2018-06-14 omar.polo
309 0d0d65c9 2018-06-14 omar.polo C-h
310 0d0d65c9 2018-06-14 omar.polo
311 0d0d65c9 2018-06-14 omar.polo > The same as Backspace
312 0d0d65c9 2018-06-14 omar.polo
313 0d0d65c9 2018-06-14 omar.polo C-w
314 0d0d65c9 2018-06-14 omar.polo
315 0d0d65c9 2018-06-14 omar.polo > Delete the last word
316 0d0d65c9 2018-06-14 omar.polo
317 0d0d65c9 2018-06-14 omar.polo C-u
318 0d0d65c9 2018-06-14 omar.polo
319 0d0d65c9 2018-06-14 omar.polo > Delete the whole line
320 0d0d65c9 2018-06-14 omar.polo
321 6254fed8 2018-07-06 omar.polo C-i
322 6254fed8 2018-07-06 omar.polo
323 6254fed8 2018-07-06 omar.polo > Toggle the \`\`first selected'' style. Sometimes, especially with the -a
324 6254fed8 2018-07-06 omar.polo > option, could be handy to disable that behaviour. Let's say that
325 6254fed8 2018-07-06 omar.polo > you've typed \`\`fire'' and the first completion is \`\`firefox'' but you
326 6254fed8 2018-07-06 omar.polo > really want to choose \`\`fire''. While you can type some spaces, this
327 6254fed8 2018-07-06 omar.polo > keybinding is a more elegant way to change, at runtime, the behaviour
328 6254fed8 2018-07-06 omar.polo > of the first completion.
329 6254fed8 2018-07-06 omar.polo
330 3518f203 2018-07-21 omar.polo # EXIT STATUS
331 3518f203 2018-07-21 omar.polo
332 3518f203 2018-07-21 omar.polo 0 when the user select an entry, 1 when the user press Esc, EX\_USAGE
333 3518f203 2018-07-21 omar.polo if used with wrong flags and EX\_UNAVAILABLE if the connection to X
334 3518f203 2018-07-21 omar.polo fails.
335 3518f203 2018-07-21 omar.polo
336 3518f203 2018-07-21 omar.polo # EXAMPLES
337 3518f203 2018-07-21 omar.polo
338 3518f203 2018-07-21 omar.polo * Create a simple menu with a couple of entry
339 3518f203 2018-07-21 omar.polo
340 3518f203 2018-07-21 omar.polo cat <<EOF | $SHELL -c "$(mymenu -p "Exec: ")"
341 3518f203 2018-07-21 omar.polo firefox
342 3518f203 2018-07-21 omar.polo zzz
343 3518f203 2018-07-21 omar.polo xcalc -stipple
344 3518f203 2018-07-21 omar.polo xlock
345 3518f203 2018-07-21 omar.polo gimp
346 3518f203 2018-07-21 omar.polo EOF
347 3518f203 2018-07-21 omar.polo
348 3518f203 2018-07-21 omar.polo * Select and play a song from the current mpd playlist
349 3518f203 2018-07-21 omar.polo
350 630eb368 2018-09-19 omar.polo fmt="%position% %artist% - %title%"
351 630eb368 2018-09-19 omar.polo if song=$(mpc playlist -f "$fmt" | mymenu -p "Song: " -A -d " "); then
352 630eb368 2018-09-19 omar.polo mpc play $(echo $song | sed "s/ .*$//")
353 3518f203 2018-07-21 omar.polo fi
354 3518f203 2018-07-21 omar.polo
355 3518f203 2018-07-21 omar.polo # SEE ALSO
356 3518f203 2018-07-21 omar.polo
357 3518f203 2018-07-21 omar.polo dmenu(1)
358 3518f203 2018-07-21 omar.polo sysexits(3)
359 3518f203 2018-07-21 omar.polo
360 3518f203 2018-07-21 omar.polo # AUTHORS
361 3518f203 2018-07-21 omar.polo
362 3518f203 2018-07-21 omar.polo Omar Polo &lt;omar.polo@europecom.net&gt;
363 3518f203 2018-07-21 omar.polo
364 0dee1b65 2018-08-13 omar.polo # CAVEATS
365 0d0d65c9 2018-06-14 omar.polo
366 0d0d65c9 2018-06-14 omar.polo * If, instead of a numeric value, a not-valid number that terminates
367 0d0d65c9 2018-06-14 omar.polo with the % sign is supplied, then the default value for that field
368 0d0d65c9 2018-06-14 omar.polo will be treated as a percentage. Since this is a misuse of the
369 0d0d65c9 2018-06-14 omar.polo resources this behavior isn't strictly considered a bug.
370 0d0d65c9 2018-06-14 omar.polo
371 ae801529 2018-07-13 omar.polo * Keep in mind that sometimes the order of the options matter. First are
372 ae801529 2018-07-13 omar.polo parsed (if any) the xrdb options, then the command line flags
373 ae801529 2018-07-13 omar.polo **in the provided order!**
374 ae801529 2018-07-13 omar.polo That meas that if you're providing first the x coordinate, let's say
375 ae801529 2018-07-13 omar.polo "middle", and
376 ae801529 2018-07-13 omar.polo **after that**
377 ae801529 2018-07-13 omar.polo you are overriding the width, the window
378 ae801529 2018-07-13 omar.polo **will not be**
379 ae801529 2018-07-13 omar.polo centered.
380 ae801529 2018-07-13 omar.polo
381 ae801529 2018-07-13 omar.polo As a general rule of thumb, if you're overriding the width and/or the
382 ae801529 2018-07-13 omar.polo height of the window, remember to override the x and y coordinates as
383 ae801529 2018-07-13 omar.polo well.
384 ae801529 2018-07-13 omar.polo
385 630eb368 2018-09-19 omar.polo OpenBSD 6.4 - September 19, 2018