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