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