6 .Nd simple menu for XOrg
10 utility a simple graphical menu for XOrg. It read the items from
12 and print the user selection to
18 The first completion (if any) is always selected. This is like dmenu.
20 Print a small usage message to stderr.
22 Print version and exit.
26 The appearance of the menu is defined through the \fBX Resource
30 The font name to use. By default is set to "fixed" if compiled without
31 Xft(3) support, "monospace" otherwise. Without Xft(3) only bitmap font
34 The layout of the menu. The possible values are "horizontal" and
35 "vertical", with the default being "horizontal". Every other value
36 than "horizontal" is treated like "vertical", but this is kinda an
37 implementation detail and not something to be relied on, since in the
38 future other layout could be added as well.
40 A string that is rendered before the user input. Default to "$ ".
42 The width of the menu. If a numeric value is given (e.g. 400) is
43 interpreted as pixel, if it ends with a percentage symbol `%'
44 (e.g. 40%) the relative percentage will be computed (relative to the
47 The height of the menu. Like MyMenu.width if a numeric value is given
48 is interpreted as pixel, if it ends with a percentage symbol `%' the
49 relative percentage will be computed (relative to the monitor height).
51 The X coordinate of the topmost left corner of the window. Much like
52 MyMenu.height and MyMenu.width both a pixel dimension and percentage
53 could be supplied. In addition to it, the special value "middle" could
54 be used: in that case the window will be centered on the x axes.
56 The Y coordinate of the topmost left corner of the window. Like the X
57 coordinate a pixel dimension, percentage dimension or the special
58 value "middle" could be supplied.
60 Change the padding. In the horizontal layout the padding is the space
61 between the rectangle of the completion and the text as well as the
62 space between the prompt and the first completion. In the horizontal
63 layout the padding is the horizontal spacing between the window edge
64 and the text as well as the space up and down the text within the
65 completion. The default value is 10.
66 .It MyMenu.border.size
67 A list of number separated by spaces to specify the border of the
68 window. The field is parsed like some CSS properties (i.e. padding),
69 that is: if only one value is provided then it'll be used for all
70 borders; if two value are given than the first will be used for the
71 top and bottom border and the former for the left and right border;
72 with three value the first is used for the top border, the second for
73 the left and right border and the third for the bottom border. If four
74 value are given, they'll be applied to the respective border
75 clockwise. Other values will be ignored. The default value is 0.
76 .It MyMenu.border.color
77 A list of colors for the borders. This field is parsed like the
78 MyMenu.border.size. The default value is black.
79 .It MyMenu.prompt.background
80 The background of the prompt.
81 .It MyMenu.prompt.foreground
82 The text color (foreground) of the prompt.
83 .It MyMenu.completion.background
84 The background of the completions.
85 .It MyMenu.completion.foreground
86 The text color of the completions.
87 .It MyMenu.completion_highlighted.background
88 The background of the selected completion.
89 .It MyMenu.completion_highlighted.foreground
90 The foreground of the selected completion.
94 This is the list of keybinding recognized by
96 In the following examples, C-c means Control-c.
97 .Bl -tag -width indent-two
99 Close the menu without selecting any entry
103 Close the menu and print to stdout what the user typed
107 Expand the prompt to the next possible completion
109 Expand the prompt to the previous possible completion
113 The same as Shift-Tab
115 Delete the last character
117 The same as Backspace
121 Delete the whole line
123 Toggle the ``first selected'' style. Sometimes, especially with the -a
124 option, could be handy to disable that behaviour. Let's say that
125 you've typed ``fire'' and the first completion is ``firefox'' but you
126 really want to choose ``fire''. While you can type some spaces, this
127 keybinding is a more elegant way to change, at runtime, the behaviour
128 of the first completion.
134 If, instead of a numeric value, a not-valid number that terminates
135 with the % sign is supplied, then the default value for that field
136 will be treated as a percentage. Since this is a misuse of the
137 resources this behavior isn't strictly considered a bug.
139 C-w (delete last word) does not work well with multi-byte string. The
140 whole UTF-8 support is still kinda naïve and should be improved.
145 0 when the user select an entry, 1 when the user press Esc, EX_USAGE
146 if used with wrong flags and EX_UNAVAILABLE if the connection to X
154 .An Omar Polo <omar.polo@europecom.net>