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