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