-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdmenu.1
298 lines (298 loc) · 5.45 KB
/
dmenu.1
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
.TH DMENU 1 dmenu\-VERSION
.SH NAME
dmenu \- dynamic menu
.SH SYNOPSIS
.B dmenu
.RB [ \-bcfirstvFP ]
.RB [ \-ix ]
.RB [ \-l
.IR lines ]
.RB [ \-h
.IR height ]
.RB [ \-m
.IR monitor ]
.RB [ \-p
.IR prompt ]
.RB [ \-it
.IR text ]
.RB [ \-d
.IR separator ]
.RB [ \-D
.IR separator ]
.RB [ \-bw
.IR border_width ]
.RB [ \-fn
.IR font ]
.RB [ \-nb
.IR color ]
.RB [ \-nf
.IR color ]
.RB [ \-sb
.IR color ]
.RB [ \-sf
.IR color ]
.RB [ \-nhb
.IR color ]
.RB [ \-nhf
.IR color ]
.RB [ \-shb
.IR color ]
.RB [ \-shf
.IR color ]
.RB [ \-w
.IR windowid ]
.P
.BR dmenu_run " ..."
.SH DESCRIPTION
.B dmenu
is a dynamic menu for X, which reads a list of newline\-separated items from
stdin. When the user selects an item and presses Return, their choice is printed
to stdout and dmenu terminates. Entering text will narrow the items to those
matching the tokens in the input.
.P
.B dmenu_run
is a script used by
.IR dwm (1)
which lists programs in the user's $PATH and runs the result in their $SHELL.
.SH OPTIONS
.TP
.B \-t
dmenu appears at the top of the screen.
.TP
.B \-b
dmenu appears at the bottom of the screen.
.TP
.B \-c
dmenu appears centered on the screen.
.TP
.B \-f
dmenu grabs the keyboard before reading stdin if not reading from a tty. This
is faster, but will lock up X until stdin reaches end\-of\-file.
.TP
.B \-i
dmenu matches menu items case insensitively.
.TP
.B \-s
dmenu matches menu items case sensitively.
.TP
.B \-F
disable fuzzy matching.
.TP
.B \-P
dmenu will not directly display the keyboard input, but instead replace it with asterisks. All data from stdin will be ignored.
.TP
.B \-r
disables ctr-return and shift-return. this guarantees that dmenu prints to
stdout only once, and it only prints an item read from stdin.
.TP
.B \-ix
dmenu prints the index of matched text instead of the text itself.
.TP
.BI \-l " lines"
dmenu lists items vertically, with the given number of lines.
.TP
.BI \-h " height"
dmenu uses a menu line of at least 'height' pixels tall, but no less than 8.
.TP
.BI \-m " monitor"
dmenu is displayed on the monitor number supplied. Monitor numbers are starting
from 0.
.TP
.BI \-p " prompt"
defines the prompt to be displayed to the left of the input field.
.TP
.BI \-it " text".
start with initial text input.
.TP
.BI \-d " separator"
separate the input into two halves on the first occurrence of the given charcter.
Display only the first half in dmenu and print the second half to stdout upon selection.
Appending '|' to the separator reverses the display/printing order.
.TP
.BI \-D " separator"
same as \-d but separate based on the last occurrence.
.TP
.BI \-bw " border_width"
defines the tickness of the window border.
.TP
.BI \-fn " font"
defines the font or font set used.
.TP
.BI \-nb " color"
defines the normal background color.
.IR #RGB ,
.IR #RRGGBB ,
and X color names are supported.
.TP
.BI \-nf " color"
defines the normal foreground color.
.TP
.BI \-sb " color"
defines the selected background color.
.TP
.BI \-sf " color"
defines the selected foreground color.
.TP
.BI \-nhb " color"
defines the normal highlight background color.
.TP
.BI \-nhf " color"
defines the normal highlight foreground color.
.TP
.BI \-shb " color"
defines the selected highlight background color.
.TP
.BI \-shf " color"
defines the selected highlight foreground color.
.TP
.B \-v
prints version information to stdout, then exits.
.TP
.BI \-w " windowid"
embed into windowid.
.SH USAGE
dmenu can be controlled by the keyboard or by the mouse. Items are selected using the
arrow keys, page up, page down, home, end or by scrolling with the mouse.
.SS Keyboard commands
.TP
.B Tab
Copy the selected item to the input field.
.TP
.B Return
Confirm selection. Prints the selected item and the items selection to stdout and exits, returning
success.
.TP
.B Ctrl-Return
Confirm selection. Add the selected item to the items selection and continues.
.TP
.B Shift\-Return
Confirm input. Prints the input text to stdout and exits, returning success.
.TP
.B Escape
Exit without selecting an item, returning failure.
.TP
.B Ctrl-Left
Move cursor to the start of the current word
.TP
.B Ctrl-Right
Move cursor to the end of the current word
.TP
.B C\-a
Home
.TP
.B C\-b
Left
.TP
.B C\-c
Escape
.TP
.B C\-d
Delete
.TP
.B C\-e
End
.TP
.B C\-f
Right
.TP
.B C\-g
Escape
.TP
.B C\-h
Backspace
.TP
.B C\-i
Tab
.TP
.B C\-j
Return
.TP
.B C\-J
Shift-Return
.TP
.B C\-k
Delete line right
.TP
.B C\-m
Return
.TP
.B C\-M
Shift-Return
.TP
.B C\-n
Down
.TP
.B C\-p
Up
.TP
.B C\-u
Delete line left
.TP
.B C\-v
Paste from X clipboard
.TP
.B C\-V
Paste from primary X selection
.TP
.B C\-w
Delete word left
.TP
.B C\-y
Paste from X clipboard
.TP
.B C\-Y
Paste from primary X selection
.TP
.B M\-b
Move cursor to the start of the current word
.TP
.B M\-f
Move cursor to the end of the current word
.TP
.B M\-g
Home
.TP
.B M\-G
End
.TP
.B M\-h
Up
.TP
.B M\-j
Page down
.TP
.B M\-k
Page up
.TP
.B M\-l
Down
.SS Mouse commands
.TP
.B Button1
If the mouse cursor is on the input field: clear input text and selection.
If the mouse cursor is on an item: same as pressing Return.
.TP
.B Ctrl-Button1
If the mouse cursor is on the input field: clear input text and selection.
If the mouse cursor is on an item: same as pressing Ctrl-Return.
.TP
.B Shift-Button1
If the mouse cursor is on input field: same as pressing Shift-Return.
.TP
.B Button2
Paste from X clipboard
.TP
.B Shift\-Button2
Paste from primary X selection
.TP
.B Button3
Exit without selecting an item, returning failure.
.TP
.B Button4
Page up
.TP
.B Button5
Page down
.SH SEE ALSO
.IR dwm (1),
.IR stest (1)