.Dd $Mdocdate$ .Dt MYMENU 1 .Os .Sh NAME .Nm mymenu .Nd simple menu for XOrg .Sh DESCRIPTION The .Nm utility a simple graphical menu for XOrg. It read the items from .Ic stdin and print the user selection to .Ic stdout on exit. .Sh OPTIONS .Bl -tag -width Ds .It Fl a The first completion (if any) is always selected. This is like dmenu. .It Fl h Print a small usage message to stderr. .It Fl v Print version and exit. .El .Sh RESOURCES The appearance of the menu is defined through the \fBX Resource Database\fR. .Bl -tag -width Ds .It MyMenu.font The font name to use. By default is set to "fixed" if compiled without Xft(3) support, "monospace" otherwise. Without Xft(3) only bitmap font are supported. .It MyMenu.layout The layout of the menu. The possible values are "horizontal" and "vertical", with the default being "horizontal". Every other value than "horizontal" is treated like "vertical", but this is kinda an implementation detail and not something to be relied on, since in the future other layout could be added as well. .It Mymenu.prompt A string that is rendered before the user input. Default to "$ ". .It MyMenu.width The width of the menu. If a numeric value is given (e.g. 400) is interpreted as pixel, if it ends with a percentage symbol `%' (e.g. 40%) the relative percentage will be computed (relative to the monitor width). .It MyMenu.height The height of the menu. Like MyMenu.width if a numeric value is given is interpreted as pixel, if it ends with a percentage symbol `%' the relative percentage will be computed (relative to the monitor height). .It MyMenu.x The X coordinate of the topmost left corner of the window. Much like MyMenu.height and MyMenu.width both a pixel dimension and percentage could be supplied. In addition to it, the special value "middle" could be used: in that case the window will be centered on the x axes. .It MyMenu.y The Y coordinate of the topmost left corner of the window. Like the X coordinate a pixel dimension, percentage dimension or the special value "middle" could be supplied. .It MyMenu.padding Change the padding. In the horizontal layout the padding is the space between the rectangle of the completion and the text as well as the space between the prompt and the first completion. In the horizontal layout the padding is the horizontal spacing between the window edge and the text as well as the space up and down the text within the completion. The default value is 10. .It MyMenu.prompt.background The background of the prompt. .It MyMenu.prompt.foreground The text color (foreground) of the prompt. .It MyMenu.completion.background The background of the completions. .It MyMenu.completion.foreground The text color of the completions. .It MyMenu.completion_highlighted.background The background of the selected completion. .It MyMenu.completion_highlighted.foreground The foreground of the selected completion. .El .Sh KEYS .Bl -tag -width indent-two .It Esc Close the menu without selecting any entry .It Enter Close the menu and print to stdout what the user typed .It C-m The same as Enter .It Tab Expand the prompt to the next possible completion .It Shift Tab Expand the prompt to the previous possible completion .It C-n The same as Tab .It C-p The same as Shift-Tab .It Backspace Delete the last character .It C-h The same as Backspace .It C-w Delete the last word .It C-u Delete the whole line .El .Sh BUGS .Bl -bullet .It If, instead of a numeric value, a not-valid number that terminates with the % sign is supplied, then the default value for that field will be treated as a percentage. Since this is a misuse of the resources this behavior isn't strictly considered a bug. .It C-w (delete last word) does not work well with multi-byte string. The whole UTF-8 support is still kinda naïve and should be improved. .El .Sh EXIT STATUS 0 when the user select an entry, 1 when the user press Esc, EX_USAGE if used with wrong flags and EX_UNAVAILABLE if the connection to X fails. .Sh SEE ALSO .Xr dmenu 1 .Xr sysexits 3 .Sh AUTHORS .An Omar Polo