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