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 OPTIONS
16 .Bl -tag -width Ds
17 .It Fl a
18 The first completion (if any) is always selected. This is like dmenu.
19 .It Fl h
20 Print a small usage message to stderr.
21 .It Fl v
22 Print version and exit.
23 .El
24 .Sh RESOURCES
26 The appearance of the menu is defined through the \fBX Resource
27 Database\fR.
28 .Bl -tag -width Ds
29 .It MyMenu.font
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
32 are supported.
33 .It MyMenu.layout
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.
39 .It Mymenu.prompt
40 A string that is rendered before the user input. Default to "$ ".
41 .It MyMenu.width
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
45 monitor width).
46 .It MyMenu.height
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).
50 .It MyMenu.x
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.
55 .It MyMenu.y
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.
59 .It MyMenu.padding
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.prompt.background
67 The background of the prompt.
68 .It MyMenu.prompt.foreground
69 The text color (foreground) of the prompt.
70 .It MyMenu.completion.background
71 The background of the completions.
72 .It MyMenu.completion.foreground
73 The text color of the completions.
74 .It MyMenu.completion_highlighted.background
75 The background of the selected completion.
76 .It MyMenu.completion_highlighted.foreground
77 The foreground of the selected completion.
78 .El
80 .Sh KEYS
81 This is the list of keybinding recognized by
82 .Li Nm Ns .
83 In the following examples, C-c means Control-c.
84 .Bl -tag -width indent-two
85 .It Esc
86 Close the menu without selecting any entry
87 .It C-c
88 The same as Esc
89 .It Enter
90 Close the menu and print to stdout what the user typed
91 .It C-m
92 The same as Enter
93 .It Tab
94 Expand the prompt to the next possible completion
95 .It Shift Tab
96 Expand the prompt to the previous possible completion
97 .It C-n
98 The same as Tab
99 .It C-p
100 The same as Shift-Tab
101 .It Backspace
102 Delete the last character
103 .It C-h
104 The same as Backspace
105 .It C-w
106 Delete the last word
107 .It C-u
108 Delete the whole line
109 .El
111 .Sh BUGS
112 .Bl -bullet
113 .It
114 If, instead of a numeric value, a not-valid number that terminates
115 with the % sign is supplied, then the default value for that field
116 will be treated as a percentage. Since this is a misuse of the
117 resources this behavior isn't strictly considered a bug.
118 .It
119 C-w (delete last word) does not work well with multi-byte string. The
120 whole UTF-8 support is still kinda naïve and should be improved.
121 .El
123 .Sh EXIT STATUS
125 0 when the user select an entry, 1 when the user press Esc, EX_USAGE
126 if used with wrong flags and EX_UNAVAILABLE if the connection to X
127 fails.
129 .Sh SEE ALSO
130 .Xr dmenu 1
131 .Xr sysexits 3
133 .Sh AUTHORS
134 .An Omar Polo <omar.polo@europecom.net>