Blame


1 f5e234d6 2018-05-18 omar.polo .Dd $Mdocdate$
2 f5e234d6 2018-05-18 omar.polo .Dt MYMENU 1
3 f5e234d6 2018-05-18 omar.polo .Os
4 f5e234d6 2018-05-18 omar.polo .Sh NAME
5 f5e234d6 2018-05-18 omar.polo .Nm mymenu
6 f5e234d6 2018-05-18 omar.polo .Nd simple menu for XOrg
7 f5e234d6 2018-05-18 omar.polo .Sh DESCRIPTION
8 f5e234d6 2018-05-18 omar.polo The
9 f5e234d6 2018-05-18 omar.polo .Nm
10 f5e234d6 2018-05-18 omar.polo utility a simple graphical menu for XOrg. It read the items from
11 f5e234d6 2018-05-18 omar.polo .Ic stdin
12 f5e234d6 2018-05-18 omar.polo and print the user selection to
13 f5e234d6 2018-05-18 omar.polo .Ic stdout
14 f5e234d6 2018-05-18 omar.polo on exit.
15 8d9debb1 2018-06-07 omar.polo .Sh OPTIONS
16 8d9debb1 2018-06-07 omar.polo .Bl -tag -width Ds
17 8d9debb1 2018-06-07 omar.polo .It Fl a
18 b500fe86 2018-06-07 omar.polo The first completion (if any) is always selected. This is like dmenu.
19 b500fe86 2018-06-07 omar.polo .It Fl h
20 b500fe86 2018-06-07 omar.polo Print a small usage message to stderr.
21 b500fe86 2018-06-07 omar.polo .It Fl v
22 b500fe86 2018-06-07 omar.polo Print version and exit.
23 8d9debb1 2018-06-07 omar.polo .El
24 f5e234d6 2018-05-18 omar.polo .Sh RESOURCES
25 f5e234d6 2018-05-18 omar.polo
26 8d9debb1 2018-06-07 omar.polo The appearance of the menu is defined through the \fBX Resource
27 8d9debb1 2018-06-07 omar.polo Database\fR.
28 f5e234d6 2018-05-18 omar.polo .Bl -tag -width Ds
29 f5e234d6 2018-05-18 omar.polo .It MyMenu.font
30 9e94fcbe 2018-05-22 omar.polo The font name to use. By default is set to "fixed" if compiled without
31 9e94fcbe 2018-05-22 omar.polo Xft(3) support, "monospace" otherwise. Without Xft(3) only bitmap font
32 9e94fcbe 2018-05-22 omar.polo are supported.
33 36a15a9f 2018-05-19 omar.polo .It MyMenu.layout
34 36a15a9f 2018-05-19 omar.polo The layout of the menu. The possible values are "horizontal" and
35 36a15a9f 2018-05-19 omar.polo "vertical", with the default being "horizontal". Every other value
36 36a15a9f 2018-05-19 omar.polo than "horizontal" is treated like "vertical", but this is kinda an
37 36a15a9f 2018-05-19 omar.polo implementation detail and not something to be relied on, since in the
38 8758854a 2018-05-20 omar.polo future other layout could be added as well.
39 8758854a 2018-05-20 omar.polo .It Mymenu.prompt
40 8758854a 2018-05-20 omar.polo A string that is rendered before the user input. Default to "$ ".
41 f5e234d6 2018-05-18 omar.polo .It MyMenu.width
42 f5e234d6 2018-05-18 omar.polo The width of the menu. If a numeric value is given (e.g. 400) is
43 f5e234d6 2018-05-18 omar.polo interpreted as pixel, if it ends with a percentage symbol `%'
44 f5e234d6 2018-05-18 omar.polo (e.g. 40%) the relative percentage will be computed (relative to the
45 8758854a 2018-05-20 omar.polo monitor width).
46 f5e234d6 2018-05-18 omar.polo .It MyMenu.height
47 f5e234d6 2018-05-18 omar.polo The height of the menu. Like MyMenu.width if a numeric value is given
48 f5e234d6 2018-05-18 omar.polo is interpreted as pixel, if it ends with a percentage symbol `%' the
49 8758854a 2018-05-20 omar.polo relative percentage will be computed (relative to the monitor height).
50 f5e234d6 2018-05-18 omar.polo .It MyMenu.x
51 f5e234d6 2018-05-18 omar.polo The X coordinate of the topmost left corner of the window. Much like
52 f5e234d6 2018-05-18 omar.polo MyMenu.height and MyMenu.width both a pixel dimension and percentage
53 8e122ff1 2018-07-13 omar.polo could be supplied. In addition to it, some special value can be used.
54 8e122ff1 2018-07-13 omar.polo .Bl -tag
55 8e122ff1 2018-07-13 omar.polo .It start
56 8e122ff1 2018-07-13 omar.polo Alias for 0;
57 8e122ff1 2018-07-13 omar.polo .It middle
58 8e122ff1 2018-07-13 omar.polo Compute the correct value to make sure that mymenu will be
59 8e122ff1 2018-07-13 omar.polo horizontally centered;
60 8e122ff1 2018-07-13 omar.polo .It end
61 8e122ff1 2018-07-13 omar.polo Compute the correct value to make sure that mymenu will be right
62 8e122ff1 2018-07-13 omar.polo aligned.
63 8e122ff1 2018-07-13 omar.polo .El
64 f5e234d6 2018-05-18 omar.polo .It MyMenu.y
65 f5e234d6 2018-05-18 omar.polo The Y coordinate of the topmost left corner of the window. Like the X
66 e5186d6b 2018-05-26 omar.polo coordinate a pixel dimension, percentage dimension or the special
67 8e122ff1 2018-07-13 omar.polo value "start", "middle", "end" could be supplied.
68 e5186d6b 2018-05-26 omar.polo .It MyMenu.padding
69 e5186d6b 2018-05-26 omar.polo Change the padding. In the horizontal layout the padding is the space
70 e5186d6b 2018-05-26 omar.polo between the rectangle of the completion and the text as well as the
71 e5186d6b 2018-05-26 omar.polo space between the prompt and the first completion. In the horizontal
72 e5186d6b 2018-05-26 omar.polo layout the padding is the horizontal spacing between the window edge
73 e5186d6b 2018-05-26 omar.polo and the text as well as the space up and down the text within the
74 e5186d6b 2018-05-26 omar.polo completion. The default value is 10.
75 500ca6c1 2018-07-08 omar.polo .It MyMenu.border.size
76 500ca6c1 2018-07-08 omar.polo A list of number separated by spaces to specify the border of the
77 500ca6c1 2018-07-08 omar.polo window. The field is parsed like some CSS properties (i.e. padding),
78 500ca6c1 2018-07-08 omar.polo that is: if only one value is provided then it'll be used for all
79 500ca6c1 2018-07-08 omar.polo borders; if two value are given than the first will be used for the
80 500ca6c1 2018-07-08 omar.polo top and bottom border and the former for the left and right border;
81 500ca6c1 2018-07-08 omar.polo with three value the first is used for the top border, the second for
82 500ca6c1 2018-07-08 omar.polo the left and right border and the third for the bottom border. If four
83 500ca6c1 2018-07-08 omar.polo value are given, they'll be applied to the respective border
84 500ca6c1 2018-07-08 omar.polo clockwise. Other values will be ignored. The default value is 0.
85 500ca6c1 2018-07-08 omar.polo .It MyMenu.border.color
86 500ca6c1 2018-07-08 omar.polo A list of colors for the borders. This field is parsed like the
87 500ca6c1 2018-07-08 omar.polo MyMenu.border.size. The default value is black.
88 f5e234d6 2018-05-18 omar.polo .It MyMenu.prompt.background
89 8758854a 2018-05-20 omar.polo The background of the prompt.
90 f5e234d6 2018-05-18 omar.polo .It MyMenu.prompt.foreground
91 8758854a 2018-05-20 omar.polo The text color (foreground) of the prompt.
92 f5e234d6 2018-05-18 omar.polo .It MyMenu.completion.background
93 8758854a 2018-05-20 omar.polo The background of the completions.
94 f5e234d6 2018-05-18 omar.polo .It MyMenu.completion.foreground
95 8758854a 2018-05-20 omar.polo The text color of the completions.
96 f5e234d6 2018-05-18 omar.polo .It MyMenu.completion_highlighted.background
97 8758854a 2018-05-20 omar.polo The background of the selected completion.
98 f5e234d6 2018-05-18 omar.polo .It MyMenu.completion_highlighted.foreground
99 8758854a 2018-05-20 omar.polo The foreground of the selected completion.
100 f5e234d6 2018-05-18 omar.polo .El
101 f5e234d6 2018-05-18 omar.polo
102 f5e234d6 2018-05-18 omar.polo .Sh KEYS
103 bee0837c 2018-07-01 omar.polo This is the list of keybinding recognized by
104 bee0837c 2018-07-01 omar.polo .Li Nm Ns .
105 bee0837c 2018-07-01 omar.polo In the following examples, C-c means Control-c.
106 f5e234d6 2018-05-18 omar.polo .Bl -tag -width indent-two
107 f5e234d6 2018-05-18 omar.polo .It Esc
108 f5e234d6 2018-05-18 omar.polo Close the menu without selecting any entry
109 bee0837c 2018-07-01 omar.polo .It C-c
110 bee0837c 2018-07-01 omar.polo The same as Esc
111 f5e234d6 2018-05-18 omar.polo .It Enter
112 f5e234d6 2018-05-18 omar.polo Close the menu and print to stdout what the user typed
113 347d23da 2018-05-19 omar.polo .It C-m
114 347d23da 2018-05-19 omar.polo The same as Enter
115 f5e234d6 2018-05-18 omar.polo .It Tab
116 f5e234d6 2018-05-18 omar.polo Expand the prompt to the next possible completion
117 f5e234d6 2018-05-18 omar.polo .It Shift Tab
118 f5e234d6 2018-05-18 omar.polo Expand the prompt to the previous possible completion
119 8ecd98cc 2018-05-25 omar.polo .It C-n
120 8ecd98cc 2018-05-25 omar.polo The same as Tab
121 8ecd98cc 2018-05-25 omar.polo .It C-p
122 8ecd98cc 2018-05-25 omar.polo The same as Shift-Tab
123 f5e234d6 2018-05-18 omar.polo .It Backspace
124 f5e234d6 2018-05-18 omar.polo Delete the last character
125 347d23da 2018-05-19 omar.polo .It C-h
126 347d23da 2018-05-19 omar.polo The same as Backspace
127 347d23da 2018-05-19 omar.polo .It C-w
128 347d23da 2018-05-19 omar.polo Delete the last word
129 347d23da 2018-05-19 omar.polo .It C-u
130 347d23da 2018-05-19 omar.polo Delete the whole line
131 6254fed8 2018-07-06 omar.polo .It C-i
132 6254fed8 2018-07-06 omar.polo Toggle the ``first selected'' style. Sometimes, especially with the -a
133 6254fed8 2018-07-06 omar.polo option, could be handy to disable that behaviour. Let's say that
134 6254fed8 2018-07-06 omar.polo you've typed ``fire'' and the first completion is ``firefox'' but you
135 6254fed8 2018-07-06 omar.polo really want to choose ``fire''. While you can type some spaces, this
136 6254fed8 2018-07-06 omar.polo keybinding is a more elegant way to change, at runtime, the behaviour
137 6254fed8 2018-07-06 omar.polo of the first completion.
138 f5e234d6 2018-05-18 omar.polo .El
139 f5e234d6 2018-05-18 omar.polo
140 f5e234d6 2018-05-18 omar.polo .Sh BUGS
141 f5e234d6 2018-05-18 omar.polo .Bl -bullet
142 f5e234d6 2018-05-18 omar.polo .It
143 f5e234d6 2018-05-18 omar.polo If, instead of a numeric value, a not-valid number that terminates
144 f5e234d6 2018-05-18 omar.polo with the % sign is supplied, then the default value for that field
145 f5e234d6 2018-05-18 omar.polo will be treated as a percentage. Since this is a misuse of the
146 f5e234d6 2018-05-18 omar.polo resources this behavior isn't strictly considered a bug.
147 9e94fcbe 2018-05-22 omar.polo .It
148 9e94fcbe 2018-05-22 omar.polo C-w (delete last word) does not work well with multi-byte string. The
149 9e94fcbe 2018-05-22 omar.polo whole UTF-8 support is still kinda naïve and should be improved.
150 f5e234d6 2018-05-18 omar.polo .El
151 f5e234d6 2018-05-18 omar.polo
152 f5e234d6 2018-05-18 omar.polo .Sh EXIT STATUS
153 f5e234d6 2018-05-18 omar.polo
154 b500fe86 2018-06-07 omar.polo 0 when the user select an entry, 1 when the user press Esc, EX_USAGE
155 b500fe86 2018-06-07 omar.polo if used with wrong flags and EX_UNAVAILABLE if the connection to X
156 b500fe86 2018-06-07 omar.polo fails.
157 f5e234d6 2018-05-18 omar.polo
158 f5e234d6 2018-05-18 omar.polo .Sh SEE ALSO
159 f5e234d6 2018-05-18 omar.polo .Xr dmenu 1
160 f5e234d6 2018-05-18 omar.polo .Xr sysexits 3
161 f5e234d6 2018-05-18 omar.polo
162 f5e234d6 2018-05-18 omar.polo .Sh AUTHORS
163 f5e234d6 2018-05-18 omar.polo .An Omar Polo <omar.polo@europecom.net>
164 f5e234d6 2018-05-18 omar.polo