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. |
f644b8bc |
40 | .SH RESOURCES |
41 | .B |
42 | xmenu |
43 | understands the following X resources. |
44 | .TP |
45 | .B xmenu.font |
46 | The font in which the labels should be drawn. |
47 | .TP |
48 | .B xmenu.background |
49 | The background color of non-selected itens in the menu. |
50 | .TP |
51 | .B xmenu.foreground |
52 | The color of the label text of non-selected itens in the menu. |
53 | .TP |
54 | .B xmenu.selbackground |
55 | The background color of selected itens in the menu. |
56 | .TP |
57 | .B xmenu.selforeground |
58 | The color of the label text of selected itens in the menu. |
59 | .TP |
60 | .B xmenu.border |
61 | The color of the border around the menu. |
62 | .TP |
63 | .B xmenu.separator |
64 | The color of the separator between itens in the menu. |
65 | .TP |
66 | .B xmenu.width |
67 | The minimum width, in pixels, of the items in the menu. |
68 | .TP |
69 | .B xmenu.itemborder |
70 | The size in pixels of the border around the label text in items in the menu. |
71 | .TP |
72 | .B xmenu.menuborder |
73 | The size in pixels of the border around the menu. |
74 | .TP |
75 | .B xmenu.separatorsize |
76 | The size in pixels of the item separator. |
77 | |
08f16589 |
78 | .SH EXAMPLES |
79 | The following is an script exemplifying the use |
80 | .BR xmenu . |
81 | The output is redirected to xargs to make a command to be run by the shell. |
82 | .IP |
83 | .EX |
84 | #!/bin/sh |
85 | |
86 | cat <<EOF | ./xmenu | xargs sh -c |
87 | Applications |
88 | Web Browser firefox |
89 | Image editor gimp |
90 | Terminal (xterm) xterm |
91 | Terminal (urxvt) urxvt |
92 | Terminal (st) st |
93 | |
94 | Shutdown poweroff |
95 | Reboot reboot |
96 | EOF |
97 | .EE |
98 | .PP |
99 | For example, by selecting \(lqApplications\(rq, a new menu will appear. |
100 | Selecting \(lqWeb Browser\(rq in the new menu will open firefox. |
101 | .SH SEE ALSO |
102 | .IR dmenu (1), |
103 | .IR 9menu (1), |
104 | .IR thingmenu (1) |