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 0d0d65c9 2018-06-14 omar.polo MyMenu.prompt.background
90 0d0d65c9 2018-06-14 omar.polo
91 0d0d65c9 2018-06-14 omar.polo > The background of the prompt.
92 0d0d65c9 2018-06-14 omar.polo
93 0d0d65c9 2018-06-14 omar.polo MyMenu.prompt.foreground
94 0d0d65c9 2018-06-14 omar.polo
95 0d0d65c9 2018-06-14 omar.polo > The text color (foreground) of the prompt.
96 0d0d65c9 2018-06-14 omar.polo
97 0d0d65c9 2018-06-14 omar.polo MyMenu.completion.background
98 0d0d65c9 2018-06-14 omar.polo
99 0d0d65c9 2018-06-14 omar.polo > The background of the completions.
100 0d0d65c9 2018-06-14 omar.polo
101 0d0d65c9 2018-06-14 omar.polo MyMenu.completion.foreground
102 0d0d65c9 2018-06-14 omar.polo
103 0d0d65c9 2018-06-14 omar.polo > The text color of the completions.
104 0d0d65c9 2018-06-14 omar.polo
105 0d0d65c9 2018-06-14 omar.polo MyMenu.completion\_highlighted.background
106 0d0d65c9 2018-06-14 omar.polo
107 0d0d65c9 2018-06-14 omar.polo > The background of the selected completion.
108 0d0d65c9 2018-06-14 omar.polo
109 0d0d65c9 2018-06-14 omar.polo MyMenu.completion\_highlighted.foreground
110 0d0d65c9 2018-06-14 omar.polo
111 0d0d65c9 2018-06-14 omar.polo > The foreground of the selected completion.
112 0d0d65c9 2018-06-14 omar.polo
113 0d0d65c9 2018-06-14 omar.polo # KEYS
114 0d0d65c9 2018-06-14 omar.polo
115 0d0d65c9 2018-06-14 omar.polo Esc
116 0d0d65c9 2018-06-14 omar.polo
117 0d0d65c9 2018-06-14 omar.polo > Close the menu without selecting any entry
118 0d0d65c9 2018-06-14 omar.polo
119 0d0d65c9 2018-06-14 omar.polo Enter
120 0d0d65c9 2018-06-14 omar.polo
121 0d0d65c9 2018-06-14 omar.polo > Close the menu and print to stdout what the user typed
122 0d0d65c9 2018-06-14 omar.polo
123 0d0d65c9 2018-06-14 omar.polo C-m
124 0d0d65c9 2018-06-14 omar.polo
125 0d0d65c9 2018-06-14 omar.polo > The same as Enter
126 0d0d65c9 2018-06-14 omar.polo
127 0d0d65c9 2018-06-14 omar.polo Tab
128 0d0d65c9 2018-06-14 omar.polo
129 0d0d65c9 2018-06-14 omar.polo > Expand the prompt to the next possible completion
130 0d0d65c9 2018-06-14 omar.polo
131 0d0d65c9 2018-06-14 omar.polo Shift Tab
132 0d0d65c9 2018-06-14 omar.polo
133 0d0d65c9 2018-06-14 omar.polo > Expand the prompt to the previous possible completion
134 0d0d65c9 2018-06-14 omar.polo
135 0d0d65c9 2018-06-14 omar.polo C-n
136 0d0d65c9 2018-06-14 omar.polo
137 0d0d65c9 2018-06-14 omar.polo > The same as Tab
138 0d0d65c9 2018-06-14 omar.polo
139 0d0d65c9 2018-06-14 omar.polo C-p
140 0d0d65c9 2018-06-14 omar.polo
141 0d0d65c9 2018-06-14 omar.polo > The same as Shift-Tab
142 0d0d65c9 2018-06-14 omar.polo
143 0d0d65c9 2018-06-14 omar.polo Backspace
144 0d0d65c9 2018-06-14 omar.polo
145 0d0d65c9 2018-06-14 omar.polo > Delete the last character
146 0d0d65c9 2018-06-14 omar.polo
147 0d0d65c9 2018-06-14 omar.polo C-h
148 0d0d65c9 2018-06-14 omar.polo
149 0d0d65c9 2018-06-14 omar.polo > The same as Backspace
150 0d0d65c9 2018-06-14 omar.polo
151 0d0d65c9 2018-06-14 omar.polo C-w
152 0d0d65c9 2018-06-14 omar.polo
153 0d0d65c9 2018-06-14 omar.polo > Delete the last word
154 0d0d65c9 2018-06-14 omar.polo
155 0d0d65c9 2018-06-14 omar.polo C-u
156 0d0d65c9 2018-06-14 omar.polo
157 0d0d65c9 2018-06-14 omar.polo > Delete the whole line
158 0d0d65c9 2018-06-14 omar.polo
159 0d0d65c9 2018-06-14 omar.polo # BUGS
160 0d0d65c9 2018-06-14 omar.polo
161 0d0d65c9 2018-06-14 omar.polo * If, instead of a numeric value, a not-valid number that terminates
162 0d0d65c9 2018-06-14 omar.polo with the % sign is supplied, then the default value for that field
163 0d0d65c9 2018-06-14 omar.polo will be treated as a percentage. Since this is a misuse of the
164 0d0d65c9 2018-06-14 omar.polo resources this behavior isn't strictly considered a bug.
165 0d0d65c9 2018-06-14 omar.polo
166 0d0d65c9 2018-06-14 omar.polo * C-w (delete last word) does not work well with multi-byte string. The
167 0d0d65c9 2018-06-14 omar.polo whole UTF-8 support is still kinda naïve and should be improved.
168 0d0d65c9 2018-06-14 omar.polo
169 0d0d65c9 2018-06-14 omar.polo # EXIT STATUS
170 0d0d65c9 2018-06-14 omar.polo
171 0d0d65c9 2018-06-14 omar.polo 0 when the user select an entry, 1 when the user press Esc, EX\_USAGE
172 0d0d65c9 2018-06-14 omar.polo if used with wrong flags and EX\_UNAVAILABLE if the connection to X
173 0d0d65c9 2018-06-14 omar.polo fails.
174 0d0d65c9 2018-06-14 omar.polo
175 0d0d65c9 2018-06-14 omar.polo # SEE ALSO
176 0d0d65c9 2018-06-14 omar.polo
177 0d0d65c9 2018-06-14 omar.polo dmenu(1)
178 0d0d65c9 2018-06-14 omar.polo sysexits(3)
179 0d0d65c9 2018-06-14 omar.polo
180 0d0d65c9 2018-06-14 omar.polo # AUTHORS
181 0d0d65c9 2018-06-14 omar.polo
182 0d0d65c9 2018-06-14 omar.polo Omar Polo <omar.polo@europecom.net>
183 0d0d65c9 2018-06-14 omar.polo
184 0d0d65c9 2018-06-14 omar.polo OpenBSD 6.3 - June 14, 2018