Blob


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