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