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 0d0d65c9 2018-06-14 omar.polo # DESCRIPTION
10 0d0d65c9 2018-06-14 omar.polo **mymenu**
11 0d0d65c9 2018-06-14 omar.polo utility a simple graphical menu for XOrg. It read the items from
12 0d0d65c9 2018-06-14 omar.polo **stdin**
13 0d0d65c9 2018-06-14 omar.polo and print the user selection to
14 0d0d65c9 2018-06-14 omar.polo **stdout**
15 0d0d65c9 2018-06-14 omar.polo on exit.
17 0d0d65c9 2018-06-14 omar.polo # OPTIONS
21 0d0d65c9 2018-06-14 omar.polo > The first completion (if any) is always selected. This is like dmenu.
25 0d0d65c9 2018-06-14 omar.polo > Print a small usage message to stderr.
29 0d0d65c9 2018-06-14 omar.polo > Print version and exit.
31 0d0d65c9 2018-06-14 omar.polo # RESOURCES
33 0d0d65c9 2018-06-14 omar.polo The appearance of the menu is defined through the **X Resource**
34 0d0d65c9 2018-06-14 omar.polo Database.
36 0d0d65c9 2018-06-14 omar.polo MyMenu.font
38 0d0d65c9 2018-06-14 omar.polo > The font name to use. By default is set to "fixed" if compiled without
39 0d0d65c9 2018-06-14 omar.polo > Xft(3) support, "monospace" otherwise. Without Xft(3) only bitmap font
40 0d0d65c9 2018-06-14 omar.polo > are supported.
42 0d0d65c9 2018-06-14 omar.polo MyMenu.layout
44 0d0d65c9 2018-06-14 omar.polo > The layout of the menu. The possible values are "horizontal" and
45 0d0d65c9 2018-06-14 omar.polo > "vertical", with the default being "horizontal". Every other value
46 0d0d65c9 2018-06-14 omar.polo > than "horizontal" is treated like "vertical", but this is kinda an
47 0d0d65c9 2018-06-14 omar.polo > implementation detail and not something to be relied on, since in the
48 0d0d65c9 2018-06-14 omar.polo > future other layout could be added as well.
50 0d0d65c9 2018-06-14 omar.polo Mymenu.prompt
52 0d0d65c9 2018-06-14 omar.polo > A string that is rendered before the user input. Default to "$ ".
54 0d0d65c9 2018-06-14 omar.polo MyMenu.width
56 0d0d65c9 2018-06-14 omar.polo > The width of the menu. If a numeric value is given (e.g. 400) is
57 0d0d65c9 2018-06-14 omar.polo > interpreted as pixel, if it ends with a percentage symbol \`%'
58 0d0d65c9 2018-06-14 omar.polo > (e.g. 40%) the relative percentage will be computed (relative to the
59 0d0d65c9 2018-06-14 omar.polo > monitor width).
61 0d0d65c9 2018-06-14 omar.polo MyMenu.height
63 0d0d65c9 2018-06-14 omar.polo > The height of the menu. Like MyMenu.width if a numeric value is given
64 0d0d65c9 2018-06-14 omar.polo > is interpreted as pixel, if it ends with a percentage symbol \`%' the
65 0d0d65c9 2018-06-14 omar.polo > relative percentage will be computed (relative to the monitor height).
67 0d0d65c9 2018-06-14 omar.polo MyMenu.x
69 0d0d65c9 2018-06-14 omar.polo > The X coordinate of the topmost left corner of the window. Much like
70 0d0d65c9 2018-06-14 omar.polo > MyMenu.height and MyMenu.width both a pixel dimension and percentage
71 0d0d65c9 2018-06-14 omar.polo > could be supplied. In addition to it, the special value "middle" could
72 0d0d65c9 2018-06-14 omar.polo > be used: in that case the window will be centered on the x axes.
74 0d0d65c9 2018-06-14 omar.polo MyMenu.y
76 0d0d65c9 2018-06-14 omar.polo > The Y coordinate of the topmost left corner of the window. Like the X
77 0d0d65c9 2018-06-14 omar.polo > coordinate a pixel dimension, percentage dimension or the special
78 0d0d65c9 2018-06-14 omar.polo > value "middle" could be supplied.
80 0d0d65c9 2018-06-14 omar.polo MyMenu.padding
82 0d0d65c9 2018-06-14 omar.polo > Change the padding. In the horizontal layout the padding is the space
83 0d0d65c9 2018-06-14 omar.polo > between the rectangle of the completion and the text as well as the
84 0d0d65c9 2018-06-14 omar.polo > space between the prompt and the first completion. In the horizontal
85 0d0d65c9 2018-06-14 omar.polo > layout the padding is the horizontal spacing between the window edge
86 0d0d65c9 2018-06-14 omar.polo > and the text as well as the space up and down the text within the
87 0d0d65c9 2018-06-14 omar.polo > completion. The default value is 10.
89 500ca6c1 2018-07-08 omar.polo MyMenu.border.size
91 500ca6c1 2018-07-08 omar.polo > A list of number separated by spaces to specify the border of the
92 500ca6c1 2018-07-08 omar.polo > window. The field is parsed like some CSS properties (i.e. padding),
93 500ca6c1 2018-07-08 omar.polo > that is: if only one value is provided then it'll be used for all
94 500ca6c1 2018-07-08 omar.polo > borders; if two value are given than the first will be used for the
95 500ca6c1 2018-07-08 omar.polo > top and bottom border and the former for the left and right border;
96 500ca6c1 2018-07-08 omar.polo > with three value the first is used for the top border, the second for
97 500ca6c1 2018-07-08 omar.polo > the left and right border and the third for the bottom border. If four
98 500ca6c1 2018-07-08 omar.polo > value are given, they'll be applied to the respective border
99 500ca6c1 2018-07-08 omar.polo > clockwise. Other values will be ignored. The default value is 0.
101 500ca6c1 2018-07-08 omar.polo MyMenu.border.color
103 500ca6c1 2018-07-08 omar.polo > A list of colors for the borders. This field is parsed like the
104 500ca6c1 2018-07-08 omar.polo > MyMenu.border.size. The default value is black.
106 0d0d65c9 2018-06-14 omar.polo MyMenu.prompt.background
108 0d0d65c9 2018-06-14 omar.polo > The background of the prompt.
110 0d0d65c9 2018-06-14 omar.polo MyMenu.prompt.foreground
112 0d0d65c9 2018-06-14 omar.polo > The text color (foreground) of the prompt.
114 0d0d65c9 2018-06-14 omar.polo MyMenu.completion.background
116 0d0d65c9 2018-06-14 omar.polo > The background of the completions.
118 0d0d65c9 2018-06-14 omar.polo MyMenu.completion.foreground
120 0d0d65c9 2018-06-14 omar.polo > The text color of the completions.
122 0d0d65c9 2018-06-14 omar.polo MyMenu.completion\_highlighted.background
124 0d0d65c9 2018-06-14 omar.polo > The background of the selected completion.
126 0d0d65c9 2018-06-14 omar.polo MyMenu.completion\_highlighted.foreground
128 0d0d65c9 2018-06-14 omar.polo > The foreground of the selected completion.
130 0d0d65c9 2018-06-14 omar.polo # KEYS
132 bee0837c 2018-07-01 omar.polo This is the list of keybinding recognized by
133 bee0837c 2018-07-01 omar.polo **mymenu**.
134 bee0837c 2018-07-01 omar.polo In the following examples, C-c means Control-c.
138 0d0d65c9 2018-06-14 omar.polo > Close the menu without selecting any entry
142 bee0837c 2018-07-01 omar.polo > The same as Esc
146 0d0d65c9 2018-06-14 omar.polo > Close the menu and print to stdout what the user typed
150 0d0d65c9 2018-06-14 omar.polo > The same as Enter
154 0d0d65c9 2018-06-14 omar.polo > Expand the prompt to the next possible completion
156 0d0d65c9 2018-06-14 omar.polo Shift Tab
158 0d0d65c9 2018-06-14 omar.polo > Expand the prompt to the previous possible completion
162 0d0d65c9 2018-06-14 omar.polo > The same as Tab
166 0d0d65c9 2018-06-14 omar.polo > The same as Shift-Tab
168 0d0d65c9 2018-06-14 omar.polo Backspace
170 0d0d65c9 2018-06-14 omar.polo > Delete the last character
174 0d0d65c9 2018-06-14 omar.polo > The same as Backspace
178 0d0d65c9 2018-06-14 omar.polo > Delete the last word
182 0d0d65c9 2018-06-14 omar.polo > Delete the whole line
186 6254fed8 2018-07-06 omar.polo > Toggle the \`\`first selected'' style. Sometimes, especially with the -a
187 6254fed8 2018-07-06 omar.polo > option, could be handy to disable that behaviour. Let's say that
188 6254fed8 2018-07-06 omar.polo > you've typed \`\`fire'' and the first completion is \`\`firefox'' but you
189 6254fed8 2018-07-06 omar.polo > really want to choose \`\`fire''. While you can type some spaces, this
190 6254fed8 2018-07-06 omar.polo > keybinding is a more elegant way to change, at runtime, the behaviour
191 6254fed8 2018-07-06 omar.polo > of the first completion.
193 0d0d65c9 2018-06-14 omar.polo # BUGS
195 0d0d65c9 2018-06-14 omar.polo * If, instead of a numeric value, a not-valid number that terminates
196 0d0d65c9 2018-06-14 omar.polo with the % sign is supplied, then the default value for that field
197 0d0d65c9 2018-06-14 omar.polo will be treated as a percentage. Since this is a misuse of the
198 0d0d65c9 2018-06-14 omar.polo resources this behavior isn't strictly considered a bug.
200 0d0d65c9 2018-06-14 omar.polo * C-w (delete last word) does not work well with multi-byte string. The
201 0d0d65c9 2018-06-14 omar.polo whole UTF-8 support is still kinda naïve and should be improved.
203 0d0d65c9 2018-06-14 omar.polo # EXIT STATUS
205 0d0d65c9 2018-06-14 omar.polo 0 when the user select an entry, 1 when the user press Esc, EX\_USAGE
206 0d0d65c9 2018-06-14 omar.polo if used with wrong flags and EX\_UNAVAILABLE if the connection to X
207 0d0d65c9 2018-06-14 omar.polo fails.
209 0d0d65c9 2018-06-14 omar.polo # SEE ALSO
211 0d0d65c9 2018-06-14 omar.polo dmenu(1)
212 0d0d65c9 2018-06-14 omar.polo sysexits(3)
214 0d0d65c9 2018-06-14 omar.polo # AUTHORS
216 0d0d65c9 2018-06-14 omar.polo Omar Polo <omar.polo@europecom.net>
218 500ca6c1 2018-07-08 omar.polo OpenBSD 6.3 - July 8, 2018