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