Blob


1 .Dd $Mdocdate$
2 .Dt MYMENU 1
3 .Os
4 .Sh NAME
5 .Nm mymenu
6 .Nd simple menu for XOrg
7 .Sh DESCRIPTION
8 The
9 .Nm
10 utility a simple graphical menu for XOrg. It read the items from
11 .Ic stdin
12 and print the user selection to
13 .Ic stdout
14 on exit.
15 .Sh RESOURCES
17 Most of the appearance of the menu is defined through the \fBX
18 Resource Database\fR.
20 Application specific resources:
21 .Bl -tag -width Ds
22 .It MyMenu.font
23 The font name to use. By default is set to "fixed" if compiled without
24 Xft(3) support, "monospace" otherwise. Without Xft(3) only bitmap font
25 are supported.
26 .It MyMenu.layout
27 The layout of the menu. The possible values are "horizontal" and
28 "vertical", with the default being "horizontal". Every other value
29 than "horizontal" is treated like "vertical", but this is kinda an
30 implementation detail and not something to be relied on, since in the
31 future other layout could be added as well.
32 .It Mymenu.prompt
33 A string that is rendered before the user input. Default to "$ ".
34 .It MyMenu.width
35 The width of the menu. If a numeric value is given (e.g. 400) is
36 interpreted as pixel, if it ends with a percentage symbol `%'
37 (e.g. 40%) the relative percentage will be computed (relative to the
38 monitor width).
39 .It MyMenu.height
40 The height of the menu. Like MyMenu.width if a numeric value is given
41 is interpreted as pixel, if it ends with a percentage symbol `%' the
42 relative percentage will be computed (relative to the monitor height).
43 .It MyMenu.x
44 The X coordinate of the topmost left corner of the window. Much like
45 MyMenu.height and MyMenu.width both a pixel dimension and percentage
46 could be supplied. In addition to it, the special value "middle" could
47 be used: in that case the window will be centered on the x axes.
48 .It MyMenu.y
49 The Y coordinate of the topmost left corner of the window. Like the X
50 coordinate a pixel dimension, percentage dimension or the special
51 value "middle" could be supplied.
52 .It MyMenu.padding
53 Change the padding. In the horizontal layout the padding is the space
54 between the rectangle of the completion and the text as well as the
55 space between the prompt and the first completion. In the horizontal
56 layout the padding is the horizontal spacing between the window edge
57 and the text as well as the space up and down the text within the
58 completion. The default value is 10.
59 .It MyMenu.prompt.background
60 The background of the prompt.
61 .It MyMenu.prompt.foreground
62 The text color (foreground) of the prompt.
63 .It MyMenu.completion.background
64 The background of the completions.
65 .It MyMenu.completion.foreground
66 The text color of the completions.
67 .It MyMenu.completion_highlighted.background
68 The background of the selected completion.
69 .It MyMenu.completion_highlighted.foreground
70 The foreground of the selected completion.
71 .El
73 .Sh KEYS
74 .Bl -tag -width indent-two
75 .It Esc
76 Close the menu without selecting any entry
77 .It Enter
78 Close the menu and print to stdout what the user typed
79 .It C-m
80 The same as Enter
81 .It Tab
82 Expand the prompt to the next possible completion
83 .It Shift Tab
84 Expand the prompt to the previous possible completion
85 .It C-n
86 The same as Tab
87 .It C-p
88 The same as Shift-Tab
89 .It Backspace
90 Delete the last character
91 .It C-h
92 The same as Backspace
93 .It C-w
94 Delete the last word
95 .It C-u
96 Delete the whole line
97 .El
99 .Sh BUGS
100 .Bl -bullet
101 .It
102 If, instead of a numeric value, a not-valid number that terminates
103 with the % sign is supplied, then the default value for that field
104 will be treated as a percentage. Since this is a misuse of the
105 resources this behavior isn't strictly considered a bug.
106 .It
107 C-w (delete last word) does not work well with multi-byte string. The
108 whole UTF-8 support is still kinda naïve and should be improved.
109 .El
111 .Sh EXIT STATUS
113 0 when the user select an entry, 1 when the user press Esc and
114 EX_UNAVAILABLE if the connection to X fails.
116 .Sh SEE ALSO
117 .Xr dmenu 1
118 .Xr sysexits 3
120 .Sh AUTHORS
121 .An Omar Polo <omar.polo@europecom.net>