Blame


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