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