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