.\" Automatically generated by Pod::Man 2.16 (Pod::Simple 3.02) .\" .\" Standard preamble: .\" ======================================================================== .de Sh \" Subsection heading .br .if t .Sp .ne 5 .PP \fB\\$1\fR .PP .. .de Sp \" Vertical space (when we can't use .PP) .if t .sp .5v .if n .sp .. .de Vb \" Begin verbatim text .ft CW .nf .ne \\$1 .. .de Ve \" End verbatim text .ft R .fi .. .\" Set up some character translations and predefined strings. \*(-- will .\" give an unbreakable dash, \*(PI will give pi, \*(L" will give a left .\" double quote, and \*(R" will give a right double quote. \*(C+ will .\" give a nicer C++. Capital omega is used to do unbreakable dashes and .\" therefore won't be available. \*(C` and \*(C' expand to `' in nroff, .\" nothing in troff, for use with C<>. .tr \(*W- .ds C+ C\v'-.1v'\h'-1p'\s-2+\h'-1p'+\s0\v'.1v'\h'-1p' .ie n \{\ . ds -- \(*W- . ds PI pi . if (\n(.H=4u)&(1m=24u) .ds -- \(*W\h'-12u'\(*W\h'-12u'-\" diablo 10 pitch . if (\n(.H=4u)&(1m=20u) .ds -- \(*W\h'-12u'\(*W\h'-8u'-\" diablo 12 pitch . ds L" "" . ds R" "" . ds C` "" . ds C' "" 'br\} .el\{\ . ds -- \|\(em\| . ds PI \(*p . ds L" `` . ds R" '' 'br\} .\" .\" Escape single quotes in literal strings from groff's Unicode transform. .ie \n(.g .ds Aq \(aq .el .ds Aq ' .\" .\" If the F register is turned on, we'll generate index entries on stderr for .\" titles (.TH), headers (.SH), subsections (.Sh), items (.Ip), and index .\" entries marked with X<> in POD. Of course, you'll have to process the .\" output yourself in some meaningful fashion. .ie \nF \{\ . de IX . tm Index:\\$1\t\\n%\t"\\$2" .. . nr % 0 . rr F .\} .el \{\ . de IX .. .\} .\" .\" Accent mark definitions (@(#)ms.acc 1.5 88/02/08 SMI; from UCB 4.2). .\" Fear. Run. Save yourself. No user-serviceable parts. . \" fudge factors for nroff and troff .if n \{\ . ds #H 0 . ds #V .8m . ds #F .3m . ds #[ \f1 . ds #] \fP .\} .if t \{\ . ds #H ((1u-(\\\\n(.fu%2u))*.13m) . ds #V .6m . ds #F 0 . ds #[ \& . ds #] \& .\} . \" simple accents for nroff and troff .if n \{\ . ds ' \& . ds ` \& . ds ^ \& . ds , \& . ds ~ ~ . ds / .\} .if t \{\ . ds ' \\k:\h'-(\\n(.wu*8/10-\*(#H)'\'\h"|\\n:u" . ds ` \\k:\h'-(\\n(.wu*8/10-\*(#H)'\`\h'|\\n:u' . ds ^ \\k:\h'-(\\n(.wu*10/11-\*(#H)'^\h'|\\n:u' . ds , \\k:\h'-(\\n(.wu*8/10)',\h'|\\n:u' . ds ~ \\k:\h'-(\\n(.wu-\*(#H-.1m)'~\h'|\\n:u' . ds / \\k:\h'-(\\n(.wu*8/10-\*(#H)'\z\(sl\h'|\\n:u' .\} . \" troff and (daisy-wheel) nroff accents .ds : \\k:\h'-(\\n(.wu*8/10-\*(#H+.1m+\*(#F)'\v'-\*(#V'\z.\h'.2m+\*(#F'.\h'|\\n:u'\v'\*(#V' .ds 8 \h'\*(#H'\(*b\h'-\*(#H' .ds o \\k:\h'-(\\n(.wu+\w'\(de'u-\*(#H)/2u'\v'-.3n'\*(#[\z\(de\v'.3n'\h'|\\n:u'\*(#] .ds d- \h'\*(#H'\(pd\h'-\w'~'u'\v'-.25m'\f2\(hy\fP\v'.25m'\h'-\*(#H' .ds D- D\\k:\h'-\w'D'u'\v'-.11m'\z\(hy\v'.11m'\h'|\\n:u' .ds th \*(#[\v'.3m'\s+1I\s-1\v'-.3m'\h'-(\w'I'u*2/3)'\s-1o\s+1\*(#] .ds Th \*(#[\s+2I\s-2\h'-\w'I'u*3/5'\v'-.3m'o\v'.3m'\*(#] .ds ae a\h'-(\w'a'u*4/10)'e .ds Ae A\h'-(\w'A'u*4/10)'E . \" corrections for vroff .if v .ds ~ \\k:\h'-(\\n(.wu*9/10-\*(#H)'\s-2\u~\d\s+2\h'|\\n:u' .if v .ds ^ \\k:\h'-(\\n(.wu*10/11-\*(#H)'\v'-.4m'^\v'.4m'\h'|\\n:u' . \" for low resolution devices (crt and lpr) .if \n(.H>23 .if \n(.V>19 \ \{\ . ds : e . ds 8 ss . ds o a . ds d- d\h'-1'\(ga . ds D- D\h'-1'\(hy . ds th \o'bp' . ds Th \o'LP' . ds ae ae . ds Ae AE .\} .rm #[ #] #H #V #F C .\" ======================================================================== .\" .IX Title "fvwm-menu-directory 1" .TH fvwm-menu-directory 1 "2009-03-22" "2.5.28 (from cvs)" "Fvwm Utilities" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l .nh .SH "NAME" fvwm\-menu\-directory \- builds a directory browsing menu for fvwm .SH "SYNOPSIS" .IX Header "SYNOPSIS" \&\fBfvwm-menu-directory\fR [ \fB\-\-help\fR|\fB\-h\fR|\fB\-?\fR ] [ \fB\-\-version\fR|\fB\-V\fR ] [ \fB\-\-name\fR|\fB\-na\fR \s-1NAME\s0 ] [ \fB\-\-title\fR|\fB\-t\fR \s-1NAME\s0 ] [ \fB\-\-item\fR|\fB\-it\fR \s-1NAME\s0 ] [ \fB\-\-icon\-title\fR|\fB\-icon\-t\fR \s-1XPM\s0 ] [ \fB\-\-icon\-dir\fR|\fB\-icon\-d\fR \s-1XPM\s0 ] [ \fB\-\-icon\-file\fR|\fB\-icon\-f\fR \s-1XPM\s0 ] [ \fB\-\-icon\-app\fR|\fB\-icon\-a\fR \s-1XPM\s0 ] [ \fB\-\-wm\-icons\fR ] [ \fB\-\-dir\fR|\fB\-d\fR \s-1NAME\s0 ] [ \fB\-\-order\fR|\fB\-o\fR \s-1NUM\s0 ] [ \fB\-\-[no]all\fR|\fB\-a\fR ] [ \fB\-\-[no]links\fR|\fB\-l\fR ] [ \fB\-\-xterm\fR|\fB\-x\fR \s-1CMD\s0 ] [ \fB\-\-exec\-title\fR|\fB\-exec\-t\fR \s-1CMD\s0 ] [ \fB\-\-exec\-file\fR|\fB\-exec\-f\fR \s-1CMD\s0 ] [ \fB\-\-exec\-app\fR|\fB\-exec\-a\fR [\s-1CMD\s0] ] [ \fB\-\-command\-title\fR|\fB\-command\-t\fR \s-1CMD\s0 ] [ \fB\-\-command\-file\fR|\fB\-command\-f\fR \s-1CMD\s0 ] [ \fB\-\-command\-app\fR|\fB\-command\-a\fR \s-1CMD\s0 ] [ \fB\-\-[no]reuse\fR|\fB\-r\fR ] [ \fB\-\-[no]check\-subdirs\fR|\fB\-ch\fR ] [ \fB\-\-special\-dirs\fR|\fB\-s\fR [\s-1VALUE\s0] ] [ \fB\-\-[no]memory\-for\-speed\fR|\fB\-mem\fR ] [ \fB\-\-menu\-style\fR|\fB\-men\fR \s-1NAME\s0 ] [ \fB\-\-func\-name\fR|\fB\-f\fR \s-1NAME\s0 ] .SH "DESCRIPTION" .IX Header "DESCRIPTION" A perl script which provides an output to read in with PipeRead to build an fvwm menu containing a directory listing. Almost everything can be configured. .SH "HINTS" .IX Header "HINTS" The title item with its own attached action is usually added to the menu. This may be used to define an action for the directory for which the menu is built, such as starting a terminal in this directory (the default). However, this may annoy some users. To disable the title action use \fB\-\-command\-title\fR "", to remove the title completely use \fB\-\-title\fR "". .SH "OPTIONS" .IX Header "OPTIONS" .IP "\fB\-\-help\fR" 4 .IX Item "--help" show the usage and exit .IP "\fB\-\-version\fR" 4 .IX Item "--version" show version and exit .IP "\fB\-\-name\fR name" 4 .IX Item "--name name" menu name, used only with \-\-reuse, default is MenuBrowser .IP "\fB\-\-title\fR title" 4 .IX Item "--title title" menu title format, default is '%*\-40p' \- last 40 characters of the current full path. \s-1TAB\s0 can be specified as '\et', but in .fvwm2rc you should specify a double backslash or a real \s-1TAB\s0. .Sp Format specifiers: \f(CW%d\fR \- the current directory name \f(CW%p\fR \- the current directory full path .Sp These specifiers can receive an optional integer size, positive for right adjusted string or negative for left adjusted, example: \f(CW%8x\fR; and optional *num or *\-num, which means to leave only the first or last (if minus) num of chars, the num must be greater than 3, since the striped part is replaced with \*(L"...\*(R", example: %*30x. Both can be combined: %\-10*\-20x, this instructs to get only the 20 last characters, but if the length is less then 10 \- to fill with up to 10 spaces on the right. .IP "\fB\-\-item\fR format" 4 .IX Item "--item format" menu item format, default is '%n'. \s-1TAB\s0 and width modifiers for \f(CW%n\fR, \f(CW%N\fR and \f(CW%s\fR can be specified as described in \fB\-\-title\fR above. Note, specifying a non default format slows the script. .Sp Format specifiers: .Sp .Vb 7 \& %n \- file/dir name (without the path) \& %N \- file/dir name (full with the path) \& %d \- file/dir date (yyyy\-mm\-dd HH:MM:SS) \& %D \- file/dir date (yyyy\-mm\-dd) \& %s \- file/dir size (in bytes) \& %t \- file/dir type (File|Dir |Link|Sock|Blck|Char|Pipe) \& %T \- file/dir type (F|D|L|S|B|C|P) .Ve .Sp Example: \-\-title '%*\-40p\etDate, Type\etSize' \-\-item '%*40n\et%d \f(CW%t\fR\et%s' .IP "\fB\-\-icon\-title\fR icon" 4 .IX Item "--icon-title icon" menu title icon, default is none .IP "\fB\-\-icon\-dir\fR icon" 4 .IX Item "--icon-dir icon" menu dir icon, default is none .IP "\fB\-\-icon\-file\fR icon" 4 .IX Item "--icon-file icon" menu file icon, default is none .IP "\fB\-\-icon\-app\fR icon" 4 .IX Item "--icon-app icon" menu application icon, default is none .IP "\fB\-\-wm\-icons\fR" 4 .IX Item "--wm-icons" define icon names suitable for use with wm-icons package. Currently this is equivalent to: \-\-icon\-title menu/folder\-open.xpm \-\-icon\-item menu/file.xpm \-\-icon\-dir menu/folder.xpm \-\-icon\-app menu/utility.xpm. .IP "\fB\-\-dir\fR dir" 4 .IX Item "--dir dir" starting dir, default is ${\s-1HOME\-\s0.} .IP "\fB\-\-order\fR number" 4 .IX Item "--order number" in the range (\-6 .. 6), default is 5: .Sp .Vb 3 \& 1 \- do not sort, 2 \- dirs first, 3 \- files first \& 4 \- sort by name, 5 \- dirs first, 6 \- files first \& Negative number represents reverse order. .Ve .IP "\fB\-\-[no]all\fR" 4 .IX Item "--[no]all" show hidden files, like in 'ls \-A', default is \-\-noall .IP "\fB\-\-[no]links\fR" 4 .IX Item "--[no]links" follow linked directories, default is \-\-nolinks .IP "\fB\-\-xterm\fR command" 4 .IX Item "--xterm command" X terminal call, default is 'xterm \-e' .IP "\fB\-\-exec\-title\fR command" 4 .IX Item "--exec-title command" an fvwm Exec command on directory title (usually the shell), default is ${SHELL\-/bin/sh}. '\-' means no Exec command, i.e. Nop. If the command is not started with '^' X terminal call is prepended. The command is started in the currently browsed directory. .IP "\fB\-\-exec\-file\fR command" 4 .IX Item "--exec-file command" an fvwm Exec command on regular files, default is ${EDITOR\-vi}. '\-' means no Exec command, i.e. Nop. If the command is not started with '^' X terminal call is prepended. The actual file name is appended to the command. .IP "\fB\-\-exec\-app\fR [command]" 4 .IX Item "--exec-app [command]" an fvwm Exec command on +x files, default is '\-', which means the same command as on regular files. If no command is given, it is assumed to be empty \- simply run the +x file. If the command is not started with '^' X terminal call is prepended. The actual file name is appended to the command. .IP "\fB\-\-command\-title\fR command" 4 .IX Item "--command-title command" an fvwm command to execute on title. If this option is not given (or command is '\-'), the \f(CW\*(C`\-\-exec\-title\*(C'\fR is used instead. In the command, \f(CW%d\fR is substituted with the full directory path. .Sp In fact, \fI\-\-exec\-title=tcsh\fR is equivalent to \fI\-\-command\-title='Exec cd \*(L"%d\*(R"; xterm \-e tcsh'\fR .Sp The empty value disables the title action. .IP "\fB\-\-command\-file\fR command" 4 .IX Item "--command-file command" an fvwm command to execute on regular files. If this option is not given (or command is '\-'), the \f(CW\*(C`\-\-exec\-file\*(C'\fR is used instead. In the command, \f(CW%f\fR is substituted with the full file path. .Sp In fact, \-\-exec\-file=vi is equivalent to \-\-command\-file='Exec xterm \-e vi \*(L"%f\*(R"' .IP "\fB\-\-command\-app\fR command" 4 .IX Item "--command-app command" an fvwm command to execute on +x files. If this option is not given (or command is '\-'), the \f(CW\*(C`\-\-command\-app\*(C'\fR is used instead. In the command, \f(CW%f\fR is substituted with the full file path. .Sp In fact, \-\-exec\-app=^exec is equivalent to \-\-command\-app='Exec exec \*(L"%f\*(R"' .IP "\fB\-\-[no]reuse\fR" 4 .IX Item "--[no]reuse" no pop-up menus, reuse the same menu, default is \-\-noreuse. When you specify this option the Menu action is used, not Popup. Also, the \-\-name parameter is not ignored, and \-\-dir parameter is ignored if there is ~/.fvwm/.fvwm\-menu\-directory.dir file. This file is only created or used with this option specified, it is the only solution for the current fvwm menu state. .IP "\fB\-\-[no]check\-subdirs\fR" 4 .IX Item "--[no]check-subdirs" check all subdirs for having execute (+x) permission and replace \*(L"Popup\*(R"/\*(L"Menu\*(R" command with \*(L"Nop\*(R" for these without permissions. This has a visual effect of disabling popup triangle in the subdirectory item. The default is \-\-nocheck\-subdirs, because: 1) enabling this slows a bit the script, 2) with this option enabled, if no icons used and no dir/file separate sorting used there is no way to know that the item is directory and not file. .IP "\fB\-\-special\-dirs\fR value" 4 .IX Item "--special-dirs value" add .. or ~ or / special directories according to given optional value. Without with option these directories are not added. Default value if not specified is \*(L"1,2\*(R". The value is comma separated ordered special directory indexes, where 1 is parent directory, 2 is home directory, 3 is root directory. If minus is prepended to the value, special directories are added at the bottom of menu instead of top. Value \*(L"0\*(R" or any bad value is equivalent to non-specifying this option at all. .IP "\fB\-\-[no]memory\-for\-speed\fR" 4 .IX Item "--[no]memory-for-speed" use speed optimization, i.e. use previously created directory menus without destroying it when closed, default is \-\-nomemory\-for\-speed .Sp .Vb 2 \& Warning: speed optimization takes up a lot of memory \& that is never free\*(Aqd again while fvwm is running. .Ve .IP "\fB\-\-menu\-style\fR name" 4 .IX Item "--menu-style name" assign MenuStyle name to the menus .IP "\fB\-\-func\-name\fR name" 4 .IX Item "--func-name name" overwrite the default MissingSubmenuFunction name that is \*(L"FuncFvwmMenuDirectory\*(R" .PP Option parameters can be specified either using '=' or in the next argument. 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 careful with short options, what is now unambiguous, can become ambiguous in the next versions. .SH "USAGE" .IX Header "USAGE" Put this into your fvwm configuration file to invoke the script: .PP .Vb 2 \& AddToFunc FuncFvwmMenuDirectory \& + I PipeRead "fvwm\-menu\-directory \-d \*(Aq$0\*(Aq" .Ve .PP More complex example: .PP .Vb 4 \& # AddToFunc FuncFvwmMenuDirectory \& # + I PipeRead "fvwm\-menu\-directory \-d \*(Aq$0\*(Aq \-x \*(AqEterm \-g 80x40 \-e\*(Aq \e\e \& \-a \-l \-o 6 \-\-exec\-app \-\-exec\-title \*(Aqtcsh \-l\*(Aq \-\-exec\-file \*(Aqvim \-R\*(Aq \e\e \& \-t \*(AqGo to: %d\*(Aq \-\-wm\-icons" .Ve .PP And put this in the menu from which you want to pop-up the directory menus: .PP .Vb 3 \& AddToMenu SomeMenu MissingSubmenuFunction FuncFvwmMenuDirectory \& + "Home Directory" Popup $[HOME] \& + "Httpd Directory" Popup /home/httpd .Ve .PP Note: please use absolute path names. .PP It is a good idea to set the menu pop-up delay to something positive and enable busy cursor .PP .Vb 2 \& MenuStyle * PopupDelayed, PopupDelay 200 \& BusyCursor DynamicMenu True .Ve .PP in your configuration file when using this script for better results. .PP Another interesting usage (\f(CW\*(C`\-\-reuse\*(C'\fR or \f(CW\*(C`\-r\*(C'\fR is mandatary for this): .PP .Vb 4 \& AddToMenu Browser \& + DynamicPopupAction PipeRead \e\e \& "fvwm\-menu\-directory \-r \-na Browser \-d / \-s" \& AddToMenu SomeMenu "My Browser" Menu Browser .Ve .PP Here the \f(CW\*(C`\-\-dir\*(C'\fR parameter (starting directory) is ignored if there is ~/.fvwm/.fvwm\-menu\-directory.dir file, which you can delete. .SH "AUTHORS" .IX Header "AUTHORS" Inspired on 1999\-06\-07 by Dominik Vogt . .PP Rewritten on 1999\-08\-05 by Mikhael Goikhman . .SH "COPYING" .IX Header "COPYING" The script is distributed by the same terms as fvwm itself. See \s-1GNU\s0 General Public License for details. .SH "BUGS" .IX Header "BUGS" Report bugs to fvwm\-bug@fvwm.org.