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