1 .\" Automatically generated by Pod::Man v1.37, Pod::Parser v1.14
4 .\" ========================================================================
5 .de Sh \" Subsection heading
13 .de Sp \" Vertical space (when we can't use .PP)
17 .de Vb \" Begin verbatim text
22 .de Ve \" End verbatim text
26 .\" Set up some character translations and predefined strings. \*(-- will
27 .\" give an unbreakable dash, \*(PI will give pi, \*(L" will give a left
28 .\" double quote, and \*(R" will give a right double quote. | will give a
29 .\" real vertical bar. \*(C+ will give a nicer C++. Capital omega is used to
30 .\" do unbreakable dashes and therefore won't be available. \*(C` and \*(C'
31 .\" expand to `' in nroff, nothing in troff, for use with C<>.
33 .ds C+ C\v'-.1v'\h'-1p'\s-2+\h'-1p'+\s0\v'.1v'\h'-1p'
37 . if (\n(.H=4u)&(1m=24u) .ds -- \(*W\h'-12u'\(*W\h'-12u'-\" diablo 10 pitch
38 . if (\n(.H=4u)&(1m=20u) .ds -- \(*W\h'-12u'\(*W\h'-8u'-\" diablo 12 pitch
51 .\" If the F register is turned on, we'll generate index entries on stderr for
52 .\" titles (.TH), headers (.SH), subsections (.Sh), items (.Ip), and index
53 .\" entries marked with X<> in POD. Of course, you'll have to process the
54 .\" output yourself in some meaningful fashion.
57 . tm Index:\\$1\t\\n%\t"\\$2"
63 .\" For nroff, turn off justification. Always turn off hyphenation; it makes
64 .\" way too many mistakes in technical documents.
68 .\" Accent mark definitions (@(#)ms.acc 1.5 88/02/08 SMI; from UCB 4.2).
69 .\" Fear. Run. Save yourself. No user-serviceable parts.
70 . \" fudge factors for nroff and troff
79 . ds #H ((1u-(\\\\n(.fu%2u))*.13m)
85 . \" simple accents for nroff and troff
95 . ds ' \\k:\h'-(\\n(.wu*8/10-\*(#H)'\'\h"|\\n:u"
96 . ds ` \\k:\h'-(\\n(.wu*8/10-\*(#H)'\`\h'|\\n:u'
97 . ds ^ \\k:\h'-(\\n(.wu*10/11-\*(#H)'^\h'|\\n:u'
98 . ds , \\k:\h'-(\\n(.wu*8/10)',\h'|\\n:u'
99 . ds ~ \\k:\h'-(\\n(.wu-\*(#H-.1m)'~\h'|\\n:u'
100 . ds / \\k:\h'-(\\n(.wu*8/10-\*(#H)'\z\(sl\h'|\\n:u'
102 . \" troff and (daisy-wheel) nroff accents
103 .ds : \\k:\h'-(\\n(.wu*8/10-\*(#H+.1m+\*(#F)'\v'-\*(#V'\z.\h'.2m+\*(#F'.\h'|\\n:u'\v'\*(#V'
104 .ds 8 \h'\*(#H'\(*b\h'-\*(#H'
105 .ds o \\k:\h'-(\\n(.wu+\w'\(de'u-\*(#H)/2u'\v'-.3n'\*(#[\z\(de\v'.3n'\h'|\\n:u'\*(#]
106 .ds d- \h'\*(#H'\(pd\h'-\w'~'u'\v'-.25m'\f2\(hy\fP\v'.25m'\h'-\*(#H'
107 .ds D- D\\k:\h'-\w'D'u'\v'-.11m'\z\(hy\v'.11m'\h'|\\n:u'
108 .ds th \*(#[\v'.3m'\s+1I\s-1\v'-.3m'\h'-(\w'I'u*2/3)'\s-1o\s+1\*(#]
109 .ds Th \*(#[\s+2I\s-2\h'-\w'I'u*3/5'\v'-.3m'o\v'.3m'\*(#]
110 .ds ae a\h'-(\w'a'u*4/10)'e
111 .ds Ae A\h'-(\w'A'u*4/10)'E
112 . \" corrections for vroff
113 .if v .ds ~ \\k:\h'-(\\n(.wu*9/10-\*(#H)'\s-2\u~\d\s+2\h'|\\n:u'
114 .if v .ds ^ \\k:\h'-(\\n(.wu*10/11-\*(#H)'\v'-.4m'^\v'.4m'\h'|\\n:u'
115 . \" for low resolution devices (crt and lpr)
116 .if \n(.H>23 .if \n(.V>19 \
129 .\" ========================================================================
131 .IX Title "FVWM-MENU-DIRECTORY 1"
132 .TH FVWM-MENU-DIRECTORY 1 "2005-07-08" "perl v5.8.5" "FVWM Utilities"
134 fvwm\-menu\-directory \- builds a directory browsing menu for FVWM
136 .IX Header "SYNOPSIS"
137 \&\fBfvwm-menu-directory\fR
138 [ \fB\-\-help\fR|\fB\-h\fR|\fB\-?\fR ]
139 [ \fB\-\-version\fR|\fB\-V\fR ]
140 [ \fB\-\-name\fR|\fB\-na\fR \s-1NAME\s0 ]
141 [ \fB\-\-title\fR|\fB\-t\fR \s-1NAME\s0 ]
142 [ \fB\-\-item\fR|\fB\-it\fR \s-1NAME\s0 ]
143 [ \fB\-\-icon\-title\fR|\fB\-icon\-t\fR \s-1XPM\s0 ]
144 [ \fB\-\-icon\-dir\fR|\fB\-icon\-d\fR \s-1XPM\s0 ]
145 [ \fB\-\-icon\-file\fR|\fB\-icon\-f\fR \s-1XPM\s0 ]
146 [ \fB\-\-icon\-app\fR|\fB\-icon\-a\fR \s-1XPM\s0 ]
147 [ \fB\-\-wm\-icons\fR ]
148 [ \fB\-\-dir\fR|\fB\-d\fR \s-1NAME\s0 ]
149 [ \fB\-\-order\fR|\fB\-o\fR \s-1NUM\s0 ]
150 [ \fB\-\-[no]all\fR|\fB\-a\fR ]
151 [ \fB\-\-[no]links\fR|\fB\-l\fR ]
152 [ \fB\-\-xterm\fR|\fB\-x\fR \s-1CMD\s0 ]
153 [ \fB\-\-exec\-title\fR|\fB\-exec\-t\fR \s-1CMD\s0 ]
154 [ \fB\-\-exec\-file\fR|\fB\-exec\-f\fR \s-1CMD\s0 ]
155 [ \fB\-\-exec\-app\fR|\fB\-exec\-a\fR [\s-1CMD\s0] ]
156 [ \fB\-\-command\-title\fR|\fB\-command\-t\fR \s-1CMD\s0 ]
157 [ \fB\-\-command\-file\fR|\fB\-command\-f\fR \s-1CMD\s0 ]
158 [ \fB\-\-command\-app\fR|\fB\-command\-a\fR \s-1CMD\s0 ]
159 [ \fB\-\-[no]reuse\fR|\fB\-r\fR ]
160 [ \fB\-\-[no]check\-subdirs\fR|\fB\-ch\fR ]
161 [ \fB\-\-special\-dirs\fR|\fB\-s\fR [\s-1VALUE\s0] ]
162 [ \fB\-\-[no]memory\-for\-speed\fR|\fB\-mem\fR ]
163 [ \fB\-\-menu\-style\fR|\fB\-men\fR \s-1NAME\s0 ]
164 [ \fB\-\-func\-name\fR|\fB\-f\fR \s-1NAME\s0 ]
166 .IX Header "DESCRIPTION"
167 A perl script which provides an output to read in with PipeRead to build an
168 fvwm menu containing a directory listing. Almost everything can be configured.
171 The title item with its own attached action is usually added to the menu.
172 This may be used to define an action for the directory for which the menu is
173 built, such as starting a terminal in this directory (the default).
174 However, this may annoy some users. To disable the title action use
175 \&\fB\-\-command\-title\fR "", to remove the title completely use \fB\-\-title\fR "".
178 .IP "\fB\-\-help\fR" 4
180 show the usage and exit
181 .IP "\fB\-\-version\fR" 4
183 show version and exit
184 .IP "\fB\-\-name\fR name" 4
185 .IX Item "--name name"
186 menu name, used only with \-\-reuse, default is MenuBrowser
187 .IP "\fB\-\-title\fR title" 4
188 .IX Item "--title title"
189 menu title format, default is '%*\-40p' \- last 40 characters
190 of the current full path.
191 \&\s-1TAB\s0 can be specified as '\et', but in .fvwm2rc you should specify a double
192 backslash or a real \s-1TAB\s0.
195 \f(CW%d\fR \- the current directory name
196 \f(CW%p\fR \- the current directory full path
198 These specifiers can receive an optional integer size, positive for right
199 adjusted string or negative for left adjusted, example: \f(CW%8x\fR; and optional
200 *num or *\-num, which means to leave only the first or last (if minus) num of
201 chars, the num must be greater than 3, since the striped part is replaced
202 with \*(L"...\*(R", example: %*30x. Both can be combined: %\-10*\-20x, this instructs to
203 get only the 20 last characters, but if the length is less then 10 \- to fill
204 with up to 10 spaces on the right.
205 .IP "\fB\-\-item\fR format" 4
206 .IX Item "--item format"
207 menu item format, default is '%n'. \s-1TAB\s0 and width modifiers
208 for \f(CW%n\fR, \f(CW%N\fR and \f(CW%s\fR can be specified as described in \fB\-\-title\fR above.
209 Note, specifying a non default format slows the script.
214 \& %n - file/dir name (without the path)
215 \& %N - file/dir name (full with the path)
216 \& %d - file/dir date (yyyy-mm-dd HH:MM:SS)
217 \& %D - file/dir date (yyyy-mm-dd)
218 \& %s - file/dir size (in bytes)
219 \& %t - file/dir type (File|Dir |Link|Sock|Blck|Char|Pipe)
220 \& %T - file/dir type (F|D|L|S|B|C|P)
223 Example: \-\-title '%*\-40p\etDate, Type\etSize' \-\-item '%*40n\et%d \f(CW%t\fR\et%s'
224 .IP "\fB\-\-icon\-title\fR icon" 4
225 .IX Item "--icon-title icon"
226 menu title icon, default is none
227 .IP "\fB\-\-icon\-dir\fR icon" 4
228 .IX Item "--icon-dir icon"
229 menu dir icon, default is none
230 .IP "\fB\-\-icon\-file\fR icon" 4
231 .IX Item "--icon-file icon"
232 menu file icon, default is none
233 .IP "\fB\-\-icon\-app\fR icon" 4
234 .IX Item "--icon-app icon"
235 menu application icon, default is none
236 .IP "\fB\-\-wm\-icons\fR" 4
237 .IX Item "--wm-icons"
238 define icon names suitable for use with wm-icons package.
239 Currently this is equivalent to: \-\-icon\-title menu/folder\-open.xpm \-\-icon\-item
240 menu/file.xpm \-\-icon\-dir menu/folder.xpm \-\-icon\-app menu/utility.xpm.
241 .IP "\fB\-\-dir\fR dir" 4
243 starting dir, default is ${\s-1HOME\-\s0.}
244 .IP "\fB\-\-order\fR number" 4
245 .IX Item "--order number"
246 in the range (\-6 .. 6), default is 5:
249 \& 1 - do not sort, 2 - dirs first, 3 - files first
250 \& 4 - sort by name, 5 - dirs first, 6 - files first
251 \& Negative number represents reverse order.
253 .IP "\fB\-\-[no]all\fR" 4
255 show hidden files, like in 'ls \-A', default is \-\-noall
256 .IP "\fB\-\-[no]links\fR" 4
257 .IX Item "--[no]links"
258 follow linked directories, default is \-\-nolinks
259 .IP "\fB\-\-xterm\fR command" 4
260 .IX Item "--xterm command"
261 X terminal call, default is 'xterm \-e'
262 .IP "\fB\-\-exec\-title\fR command" 4
263 .IX Item "--exec-title command"
264 an fvwm Exec command on directory title (usually the
265 shell), default is ${SHELL\-/bin/sh}.
266 \&'\-' means no Exec command, i.e. Nop.
267 If the command is not started with '^' X terminal call is prepended.
268 The command is started in the currently browsed directory.
269 .IP "\fB\-\-exec\-file\fR command" 4
270 .IX Item "--exec-file command"
271 an fvwm Exec command on regular files,
272 default is ${EDITOR\-vi}.
273 \&'\-' means no Exec command, i.e. Nop.
274 If the command is not started with '^' X terminal call is prepended.
275 The actual file name is appended to the command.
276 .IP "\fB\-\-exec\-app\fR [command]" 4
277 .IX Item "--exec-app [command]"
278 an fvwm Exec command on +x files, default is '\-',
279 which means the same command as on regular files. If no command is given,
280 it is assumed to be empty \- simply run the +x file.
281 If the command is not started with '^' X terminal call is prepended.
282 The actual file name is appended to the command.
283 .IP "\fB\-\-command\-title\fR command" 4
284 .IX Item "--command-title command"
285 an fvwm command to execute on title.
286 If this option is not given (or command is '\-'), the \f(CW\*(C`\-\-exec\-title\*(C'\fR
288 In the command, \f(CW%d\fR is substituted with the full directory path.
290 In fact, \fI\-\-exec\-title=tcsh\fR is equivalent
291 to \fI\-\-command\-title='Exec cd \*(L"%d\*(R"; xterm \-e tcsh'\fR
293 The empty value disables the title action.
294 .IP "\fB\-\-command\-file\fR command" 4
295 .IX Item "--command-file command"
296 an fvwm command to execute on regular files.
297 If this option is not given (or command is '\-'), the \f(CW\*(C`\-\-exec\-file\*(C'\fR
299 In the command, \f(CW%f\fR is substituted with the full file path.
301 In fact, \-\-exec\-file=vi is equivalent
302 to \-\-command\-file='Exec xterm \-e vi \*(L"%f\*(R"'
303 .IP "\fB\-\-command\-app\fR command" 4
304 .IX Item "--command-app command"
305 an fvwm command to execute on +x files.
306 If this option is not given (or command is '\-'), the \f(CW\*(C`\-\-command\-app\*(C'\fR
308 In the command, \f(CW%f\fR is substituted with the full file path.
310 In fact, \-\-exec\-app=^exec is equivalent
311 to \-\-command\-app='Exec exec \*(L"%f\*(R"'
312 .IP "\fB\-\-[no]reuse\fR" 4
313 .IX Item "--[no]reuse"
314 no pop-up menus, reuse the same menu, default is \-\-noreuse.
315 When you specify this option the Menu action is used, not Popup. Also,
316 the \-\-name parameter is not ignored, and \-\-dir parameter is ignored
317 if there is ~/.fvwm/.fvwm\-menu\-directory.dir file. This file is only created
318 or used with this option specified, it is the only solution for the current
320 .IP "\fB\-\-[no]check\-subdirs\fR" 4
321 .IX Item "--[no]check-subdirs"
322 check all subdirs for having execute (+x) permission
323 and replace \*(L"Popup\*(R"/\*(L"Menu\*(R" command with \*(L"Nop\*(R" for these without permissions.
324 This has a visual effect of disabling popup triangle in the subdirectory item.
325 The default is \-\-nocheck\-subdirs, because: 1) enabling this slows a bit the
326 script, 2) with this option enabled, if no icons used and no dir/file separate
327 sorting used there is no way to know that the item is directory and not file.
328 .IP "\fB\-\-special\-dirs\fR value" 4
329 .IX Item "--special-dirs value"
330 add .. or ~ or / special directories according to
331 given optional value. Without with option these directories are not added.
332 Default value if not specified is \*(L"1,2\*(R". The value is comma separated ordered
333 special directory indexes, where 1 is parent directory, 2 is home directory,
334 3 is root directory. If minus is prepended to the value, special directories
335 are added at the bottom of menu instead of top. Value \*(L"0\*(R" or any bad value
336 is equivalent to non-specifying this option at all.
337 .IP "\fB\-\-[no]memory\-for\-speed\fR" 4
338 .IX Item "--[no]memory-for-speed"
339 use speed optimization, i.e. use previously
340 created directory menus without destroying it when closed, default is
341 \&\-\-nomemory\-for\-speed
344 \& Warning: speed optimization takes up a lot of memory
345 \& that is never free'd again while fvwm is running.
347 .IP "\fB\-\-menu\-style\fR name" 4
348 .IX Item "--menu-style name"
349 assign MenuStyle name to the menus
350 .IP "\fB\-\-func\-name\fR name" 4
351 .IX Item "--func-name name"
352 overwrite the default MissingSubmenuFunction name that is
353 \&\*(L"FuncFvwmMenuDirectory\*(R"
355 Option parameters can be specified either using '=' or in the next argument.
356 Short options are ok if not ambiguous: \f(CW\*(C`\-a\*(C'\fR, \f(CW\*(C`\-x\*(C'\fR, \f(CW\*(C`\-icon\-f\*(C'\fR; but be
357 careful with short options, what is now unambiguous, can become ambiguous
358 in the next versions.
361 Put this into your fvwm configuration file to invoke the script:
364 \& AddToFunc FuncFvwmMenuDirectory
365 \& + I PipeRead "fvwm-menu-directory -d '$0'"
368 More complex example:
371 \& # AddToFunc FuncFvwmMenuDirectory
372 \& # + I PipeRead "fvwm-menu-directory -d '$0' -x 'Eterm -g 80x40 -e' \e\e
373 \& -a -l -o 6 --exec-app --exec-title 'tcsh -l' --exec-file 'vim -R' \e\e
374 \& -t 'Go to: %d' --wm-icons"
377 And put this in the menu from which you want to pop-up the directory menus:
380 \& AddToMenu SomeMenu MissingSubmenuFunction FuncFvwmMenuDirectory
381 \& + "Home Directory" Popup $[HOME]
382 \& + "Httpd Directory" Popup /home/httpd
385 Note: please use absolute path names.
387 It is a good idea to set the menu pop-up delay to something positive
388 and enable busy cursor
391 \& MenuStyle * PopupDelayed, PopupDelay 200
392 \& BusyCursor DynamicMenu True
395 in your configuration file when using this script for better results.
397 Another interesting usage (\f(CW\*(C`\-\-reuse\*(C'\fR or \f(CW\*(C`\-r\*(C'\fR is mandatary for this):
401 \& + DynamicPopupAction PipeRead \e\e
402 \& "fvwm-menu-directory -r -na Browser -d / -s"
403 \& AddToMenu SomeMenu "My Browser" Menu Browser
406 Here the \f(CW\*(C`\-\-dir\*(C'\fR parameter (starting directory) is ignored if there is
407 ~/.fvwm/.fvwm\-menu\-directory.dir file, which you can delete.
410 Inspired on 1999\-06\-07 by Dominik Vogt <domivogt@fvwm.org>.
412 Rewritten on 1999\-08\-05 by Mikhael Goikhman <migo@homemail.com>.
415 The script is distributed by the same terms as fvwm itself.
416 See \s-1GNU\s0 General Public License for details.
419 Report bugs to fvwm\-bug@fvwm.org.