added prompt option (-p 'prompt text'), documented in man page as well
[dmenu.git] / dmenu.1
1 .TH DMENU 1 dmenu-VERSION
2 .SH NAME
3 dmenu \- dynamic menu
4 .SH SYNOPSIS
5 .B dmenu
6 .RB [ \-font " <name>"]
7 .RB [ \-normbg " <color>"]
8 .RB [ \-normfg " <color>"]
9 .RB [ \-selbg " <color>"]
10 .RB [ \-selfg " <color>"]
11 .RB [ \-p " <prompt>"]
12 .RB [ \-t " <seconds>"]
13 .RB [ \-v ]
14 .SH DESCRIPTION
15 .SS Overview
16 dmenu is a generic menu for X, originally designed for
17 .BR dwm (1).
18 It manages huge amounts (up to 10.000 and more) of user defined menu items
19 efficiently.
20 .SS Options
21 .TP
22 .B \-font <name>
23 defines the font.
24 .TP
25 .B \-normbg <color>
26 defines the normal background color (#RGB, #RRGGBB, and color names are supported).
27 .TP
28 .B \-normfg <color>
29 defines the normal foreground color (#RGB, #RRGGBB, and color names are supported).
30 .TP
31 .B \-selbg <color>
32 defines the selected background color (#RGB, #RRGGBB, and color names are supported).
33 .TP
34 .B \-selfg <color>
35 defines the selected foreground color (#RGB, #RRGGBB, and color names are supported).
36 .TP
37 .B \-p <prompt>
38 defines a prompt being displayed before input area.
39 .TP
40 .B \-t <seconds>
41 defines the seconds to wait for standard input, before exiting (default is 3).
42 .TP
43 .B \-v
44 prints version information to standard output, then exits.
45 .SH USAGE
46 dmenu reads a list of newline-separated items from standard input and creates a
47 menu.  When the user selects an item or enters any text and presses Return, his/her
48 choice is printed to standard output and dmenu terminates.
49 .P
50 dmenu is completely controlled by the keyboard. The following keys are recognized:
51 .TP
52 .B Any printable character
53 Appends the character to the text in the input field.  This works as a filter:
54 only items containing this text will be displayed.
55 .TP
56 .B Left/Right
57 Select the previous/next item.
58 .TP
59 .B PageUp/PageDown
60 Select the first item of the previous/next 'page' of items.
61 .TP
62 .B Home/End
63 Select the first/last item.
64 .TP
65 .B Tab
66 Copy the selected item to the input field.
67 .TP
68 .B Return
69 Confirm selection and quit (print the selected item to standard output). Returns
70 .B 0
71 on termination.
72 .TP
73 .B Shift-Return
74 Confirm selection and quit (print the text in the input field to standard output).
75 Returns
76 .B 0
77 on termination.
78 .TP
79 .B Escape
80 Quit without selecting an item. Returns
81 .B 1
82 on termination.
83 .TP
84 .B Backspace (Control-h)
85 Remove enough characters from the input field to change its filtering effect.
86 .TP
87 .B Control-u
88 Remove all characters from the input field.
89 .SH SEE ALSO
90 .BR dwm (1)