5a83c7dc |
1 | .TH XMENU 1 |
08f16589 |
2 | .SH NAME |
3 | xmenu \- menu utility for X |
4 | .SH SYNOPSIS |
5 | .B xmenu |
644a15bb |
6 | .RB [ \-fiw ] |
05cfe1a0 |
7 | .RB [ -p |
8 | .IR position ] |
3bec05ea |
9 | .RI [ title ] |
08f16589 |
10 | .SH DESCRIPTION |
11 | .B xmenu |
12 | is a menu for X, |
13 | it reads a list of newline-separated items from stdin, |
14 | shows a menu for the user to select one of the items, |
15 | and outputs the item selected to stdout. |
16 | .PP |
3bec05ea |
17 | The options are as follows: |
18 | .TP |
644a15bb |
19 | .B -f |
20 | Make glyphs align based solely on the first font specified. |
21 | Without this option, glyphs are aligned based on the font in which they are found. |
22 | This option may correct alignment of CJK glyphs |
23 | if a CJK font is specified after a Latin font, |
24 | but may break the alignment of other glyphs in some cases. |
25 | .TP |
71b4db92 |
26 | .B -i |
27 | Disable icons. |
7832d2cf |
28 | This makes xmenu loading faster when not using icons. |
71b4db92 |
29 | .TP |
05cfe1a0 |
30 | .BI -p " position" |
31 | Set the position to spawn xmenu. |
32 | Without this option, xmenu spawns next to the cursor. |
33 | .I position |
34 | is a string of the form |
237da982 |
35 | .BR INTxINT[:MONITOR] , |
05cfe1a0 |
36 | where the first INT is the x position and the second INT is the y position. |
237da982 |
37 | The monitor part between brackets is optional. |
38 | .B MONITOR |
39 | can be a number from 0 to the number of monitors minus 1; |
40 | or it can be a string like |
41 | .B current |
42 | or |
43 | .BR cursor . |
44 | If present, the monitor specifies that the position is relative to the upper left corner |
45 | of that monitor. |
46 | If |
47 | .B monitor |
48 | is |
49 | .B current |
50 | or |
51 | .BR cursor , |
52 | the monitor to be used is that where the cursor is in. |
53 | For example, |
54 | .B -p 0x0:cursor |
55 | specifies that |
56 | .B xmenu |
57 | must spawn at the position 0x0 of the monitor where the cursor is in. |
58 | And |
59 | .B -p 100x500:0 |
60 | specifies that |
61 | .B xmenu |
62 | must spawn at the position 100x500 of the monitor 0. |
05cfe1a0 |
63 | .TP |
3bec05ea |
64 | .B -w |
65 | Asks the window manager to draw a border around the menus. |
71b4db92 |
66 | This option may be buggy in some window managers, |
67 | specially tiled ones that do not respect window hints. |
3bec05ea |
68 | .PP |
08f16589 |
69 | Each item read from stdin has the following format: |
70 | .IP |
71 | .EX |
33376f54 |
72 | ITEM := [TABS] [[IMAGE TABS] LABEL [TABS OUTPUT]] NEWLINE |
08f16589 |
73 | .EE |
74 | .PP |
6b5123e7 |
75 | That means that each item is composed by |
33376f54 |
76 | tabs, followed by an optional image specification, followed by tabs |
77 | followed by a label, followed by more tabs, followed by an output, |
6b5123e7 |
78 | and ended by a newline. Brackets group optional elements. |
08f16589 |
79 | .IP |
80 | The initial tabs indicate the menu hierarchy: |
81 | items indented with a tab is shown in a submenu of the preceding item not indented. |
6b5123e7 |
82 | An item without initial tabs is a top-level item. |
08f16589 |
83 | .IP |
33376f54 |
84 | The image is a string of the form "IMG:/path/to/image.png". |
85 | It specifies a image to be shown as icon at the left of the entry. |
86 | .IP |
08f16589 |
87 | The label is the string that will be shown as a item in the menu. |
88 | An item without label is considered a separator and is drawn as a thin line in the menu |
89 | separating the item above from the item below. |
90 | .IP |
6b5123e7 |
91 | The output is the string that will be output after selecting the item. |
92 | If an item does not have an output, its label is used as its output. |
08f16589 |
93 | .IP |
94 | The newline terminates the item specification. |
3bec05ea |
95 | .PP |
96 | If the argument |
97 | .I title |
98 | is given, the title of the menu window is set to it. |
858338d9 |
99 | .SH USAGE |
100 | .B xmenu |
101 | is controlled by the mouse, |
102 | but can also be controlled by the keyboard. |
103 | Items can be selected using the arrow keys, |
104 | Tab (with and without Shift), |
105 | Enter and Esc. |
106 | .TP |
107 | .BR Down ", " Tab |
108 | Cycle through the items in the regular direction. |
109 | .TP |
110 | .BR Up ", " Shift-Tab |
111 | Cycle through the items in the reverse direction. |
112 | .TP |
113 | .BR Right ", " Enter |
114 | Select the highlighted item. |
115 | .TP |
116 | .B Left |
117 | Go to the menu above. |
118 | .TP |
119 | .B Esc |
120 | Go to the menu above or exit xmenu. |
f644b8bc |
121 | .SH RESOURCES |
122 | .B |
123 | xmenu |
124 | understands the following X resources. |
125 | .TP |
126 | .B xmenu.font |
127 | The font in which the labels should be drawn. |
cdeaefaa |
128 | Multiple fonts can be added as fallback fonts; |
129 | they must be separated by a comma. |
f644b8bc |
130 | .TP |
131 | .B xmenu.background |
5a83c7dc |
132 | The background color of non-selected items in the menu. |
f644b8bc |
133 | .TP |
134 | .B xmenu.foreground |
5a83c7dc |
135 | The color of the label text of non-selected items in the menu. |
f644b8bc |
136 | .TP |
137 | .B xmenu.selbackground |
5a83c7dc |
138 | The background color of selected items in the menu. |
f644b8bc |
139 | .TP |
140 | .B xmenu.selforeground |
5a83c7dc |
141 | The color of the label text of selected items in the menu. |
f644b8bc |
142 | .TP |
143 | .B xmenu.border |
144 | The color of the border around the menu. |
145 | .TP |
146 | .B xmenu.separator |
5a83c7dc |
147 | The color of the separator between items in the menu. |
f644b8bc |
148 | .TP |
92e7609b |
149 | .B xmenu.gap |
150 | The gap, in pixels, between the menus. |
151 | .TP |
f644b8bc |
152 | .B xmenu.width |
153 | The minimum width, in pixels, of the items in the menu. |
154 | .TP |
685ca30d |
155 | .B xmenu.height |
156 | The size in pixels of the height of a single menu item. |
f644b8bc |
157 | .TP |
fd530f3f |
158 | .B xmenu.borderWidth |
f644b8bc |
159 | The size in pixels of the border around the menu. |
160 | .TP |
fd530f3f |
161 | .B xmenu.separatorWidth |
f644b8bc |
162 | The size in pixels of the item separator. |
163 | |
08f16589 |
164 | .SH EXAMPLES |
d584fba6 |
165 | The following script illustrates the use of |
08f16589 |
166 | .BR xmenu . |
c49dad28 |
167 | The output is redirected to |
168 | .IR sh (1), |
169 | creating a command to be run by the shell. |
08f16589 |
170 | .IP |
171 | .EX |
172 | #!/bin/sh |
173 | |
6b5123e7 |
174 | cat <<EOF | xmenu | sh & |
08f16589 |
175 | Applications |
33376f54 |
176 | IMG:./web.png Web Browser firefox |
d584fba6 |
177 | IMG:./gimp.png Image editor gimp |
33376f54 |
178 | Terminal (xterm) xterm |
179 | Terminal (urxvt) urxvt |
180 | Terminal (st) st |
08f16589 |
181 | |
33376f54 |
182 | Shutdown poweroff |
183 | Reboot reboot |
08f16589 |
184 | EOF |
185 | .EE |
186 | .PP |
187 | For example, by selecting \(lqApplications\(rq, a new menu will appear. |
d584fba6 |
188 | Selecting \(lqWeb Browser\(rq in the new menu opens firefox. |
08f16589 |
189 | .SH SEE ALSO |
190 | .IR dmenu (1), |
191 | .IR 9menu (1), |
192 | .IR thingmenu (1) |