NEWS/Changelog for previous commit.
[fvwm.git] / bin / fvwm-menu-directory.1
blob2671264378c908a81f5052a155c5e6999c8d36af
1 .\" Automatically generated by Pod::Man 2.16 (Pod::Simple 3.02)
2 .\"
3 .\" Standard preamble:
4 .\" ========================================================================
5 .de Sh \" Subsection heading
6 .br
7 .if t .Sp
8 .ne 5
9 .PP
10 \fB\\$1\fR
11 .PP
13 .de Sp \" Vertical space (when we can't use .PP)
14 .if t .sp .5v
15 .if n .sp
17 .de Vb \" Begin verbatim text
18 .ft CW
19 .nf
20 .ne \\$1
22 .de Ve \" End verbatim text
23 .ft R
24 .fi
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.  \*(C+ will
29 .\" give a nicer C++.  Capital omega is used to do unbreakable dashes and
30 .\" therefore won't be available.  \*(C` and \*(C' expand to `' in nroff,
31 .\" nothing in troff, for use with C<>.
32 .tr \(*W-
33 .ds C+ C\v'-.1v'\h'-1p'\s-2+\h'-1p'+\s0\v'.1v'\h'-1p'
34 .ie n \{\
35 .    ds -- \(*W-
36 .    ds PI pi
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
39 .    ds L" ""
40 .    ds R" ""
41 .    ds C` ""
42 .    ds C' ""
43 'br\}
44 .el\{\
45 .    ds -- \|\(em\|
46 .    ds PI \(*p
47 .    ds L" ``
48 .    ds R" ''
49 'br\}
50 .\"
51 .\" Escape single quotes in literal strings from groff's Unicode transform.
52 .ie \n(.g .ds Aq \(aq
53 .el       .ds Aq '
54 .\"
55 .\" If the F register is turned on, we'll generate index entries on stderr for
56 .\" titles (.TH), headers (.SH), subsections (.Sh), items (.Ip), and index
57 .\" entries marked with X<> in POD.  Of course, you'll have to process the
58 .\" output yourself in some meaningful fashion.
59 .ie \nF \{\
60 .    de IX
61 .    tm Index:\\$1\t\\n%\t"\\$2"
63 .    nr % 0
64 .    rr F
65 .\}
66 .el \{\
67 .    de IX
69 .\}
70 .\"
71 .\" Accent mark definitions (@(#)ms.acc 1.5 88/02/08 SMI; from UCB 4.2).
72 .\" Fear.  Run.  Save yourself.  No user-serviceable parts.
73 .    \" fudge factors for nroff and troff
74 .if n \{\
75 .    ds #H 0
76 .    ds #V .8m
77 .    ds #F .3m
78 .    ds #[ \f1
79 .    ds #] \fP
80 .\}
81 .if t \{\
82 .    ds #H ((1u-(\\\\n(.fu%2u))*.13m)
83 .    ds #V .6m
84 .    ds #F 0
85 .    ds #[ \&
86 .    ds #] \&
87 .\}
88 .    \" simple accents for nroff and troff
89 .if n \{\
90 .    ds ' \&
91 .    ds ` \&
92 .    ds ^ \&
93 .    ds , \&
94 .    ds ~ ~
95 .    ds /
96 .\}
97 .if t \{\
98 .    ds ' \\k:\h'-(\\n(.wu*8/10-\*(#H)'\'\h"|\\n:u"
99 .    ds ` \\k:\h'-(\\n(.wu*8/10-\*(#H)'\`\h'|\\n:u'
100 .    ds ^ \\k:\h'-(\\n(.wu*10/11-\*(#H)'^\h'|\\n:u'
101 .    ds , \\k:\h'-(\\n(.wu*8/10)',\h'|\\n:u'
102 .    ds ~ \\k:\h'-(\\n(.wu-\*(#H-.1m)'~\h'|\\n:u'
103 .    ds / \\k:\h'-(\\n(.wu*8/10-\*(#H)'\z\(sl\h'|\\n:u'
105 .    \" troff and (daisy-wheel) nroff accents
106 .ds : \\k:\h'-(\\n(.wu*8/10-\*(#H+.1m+\*(#F)'\v'-\*(#V'\z.\h'.2m+\*(#F'.\h'|\\n:u'\v'\*(#V'
107 .ds 8 \h'\*(#H'\(*b\h'-\*(#H'
108 .ds o \\k:\h'-(\\n(.wu+\w'\(de'u-\*(#H)/2u'\v'-.3n'\*(#[\z\(de\v'.3n'\h'|\\n:u'\*(#]
109 .ds d- \h'\*(#H'\(pd\h'-\w'~'u'\v'-.25m'\f2\(hy\fP\v'.25m'\h'-\*(#H'
110 .ds D- D\\k:\h'-\w'D'u'\v'-.11m'\z\(hy\v'.11m'\h'|\\n:u'
111 .ds th \*(#[\v'.3m'\s+1I\s-1\v'-.3m'\h'-(\w'I'u*2/3)'\s-1o\s+1\*(#]
112 .ds Th \*(#[\s+2I\s-2\h'-\w'I'u*3/5'\v'-.3m'o\v'.3m'\*(#]
113 .ds ae a\h'-(\w'a'u*4/10)'e
114 .ds Ae A\h'-(\w'A'u*4/10)'E
115 .    \" corrections for vroff
116 .if v .ds ~ \\k:\h'-(\\n(.wu*9/10-\*(#H)'\s-2\u~\d\s+2\h'|\\n:u'
117 .if v .ds ^ \\k:\h'-(\\n(.wu*10/11-\*(#H)'\v'-.4m'^\v'.4m'\h'|\\n:u'
118 .    \" for low resolution devices (crt and lpr)
119 .if \n(.H>23 .if \n(.V>19 \
121 .    ds : e
122 .    ds 8 ss
123 .    ds o a
124 .    ds d- d\h'-1'\(ga
125 .    ds D- D\h'-1'\(hy
126 .    ds th \o'bp'
127 .    ds Th \o'LP'
128 .    ds ae ae
129 .    ds Ae AE
131 .rm #[ #] #H #V #F C
132 .\" ========================================================================
134 .IX Title "fvwm-menu-directory 1"
135 .TH fvwm-menu-directory 1 "2009-03-22" "2.5.28 (from cvs)" "Fvwm Utilities"
136 .\" For nroff, turn off justification.  Always turn off hyphenation; it makes
137 .\" way too many mistakes in technical documents.
138 .if n .ad l
140 .SH "NAME"
141 fvwm\-menu\-directory \- builds a directory browsing menu for fvwm
142 .SH "SYNOPSIS"
143 .IX Header "SYNOPSIS"
144 \&\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 ]
145 .SH "DESCRIPTION"
146 .IX Header "DESCRIPTION"
147 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.
148 .SH "HINTS"
149 .IX Header "HINTS"
150 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 "".
151 .SH "OPTIONS"
152 .IX Header "OPTIONS"
153 .IP "\fB\-\-help\fR" 4
154 .IX Item "--help"
155 show the usage and exit
156 .IP "\fB\-\-version\fR" 4
157 .IX Item "--version"
158 show version and exit
159 .IP "\fB\-\-name\fR name" 4
160 .IX Item "--name name"
161 menu name, used only with \-\-reuse, default is MenuBrowser
162 .IP "\fB\-\-title\fR title" 4
163 .IX Item "--title title"
164 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.
166 Format specifiers: \f(CW%d\fR \- the current directory name \f(CW%p\fR \- the current directory full path
168 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.
169 .IP "\fB\-\-item\fR format" 4
170 .IX Item "--item format"
171 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.
173 Format specifiers:
175 .Vb 7
176 \&  %n \- file/dir name (without the path)
177 \&  %N \- file/dir name (full with the path)
178 \&  %d \- file/dir date (yyyy\-mm\-dd HH:MM:SS)
179 \&  %D \- file/dir date (yyyy\-mm\-dd)
180 \&  %s \- file/dir size (in bytes)
181 \&  %t \- file/dir type (File|Dir |Link|Sock|Blck|Char|Pipe)
182 \&  %T \- file/dir type (F|D|L|S|B|C|P)
185 Example: \-\-title '%*\-40p\etDate, Type\etSize' \-\-item '%*40n\et%d \f(CW%t\fR\et%s'
186 .IP "\fB\-\-icon\-title\fR icon" 4
187 .IX Item "--icon-title icon"
188 menu title icon, default is none
189 .IP "\fB\-\-icon\-dir\fR icon" 4
190 .IX Item "--icon-dir icon"
191 menu dir icon, default is none
192 .IP "\fB\-\-icon\-file\fR icon" 4
193 .IX Item "--icon-file icon"
194 menu file icon, default is none
195 .IP "\fB\-\-icon\-app\fR icon" 4
196 .IX Item "--icon-app icon"
197 menu application icon, default is none
198 .IP "\fB\-\-wm\-icons\fR" 4
199 .IX Item "--wm-icons"
200 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.
201 .IP "\fB\-\-dir\fR dir" 4
202 .IX Item "--dir dir"
203 starting dir, default is ${\s-1HOME\-\s0.}
204 .IP "\fB\-\-order\fR number" 4
205 .IX Item "--order number"
206 in the range (\-6 .. 6), default is 5:
208 .Vb 3
209 \&  1 \- do not sort,  2 \- dirs first, 3 \- files first
210 \&  4 \- sort by name, 5 \- dirs first, 6 \- files first
211 \&  Negative number represents reverse order.
213 .IP "\fB\-\-[no]all\fR" 4
214 .IX Item "--[no]all"
215 show hidden files, like in 'ls \-A', default is \-\-noall
216 .IP "\fB\-\-[no]links\fR" 4
217 .IX Item "--[no]links"
218 follow linked directories, default is \-\-nolinks
219 .IP "\fB\-\-xterm\fR command" 4
220 .IX Item "--xterm command"
221 X terminal call, default is 'xterm \-e'
222 .IP "\fB\-\-exec\-title\fR command" 4
223 .IX Item "--exec-title command"
224 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.
225 .IP "\fB\-\-exec\-file\fR command" 4
226 .IX Item "--exec-file command"
227 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.
228 .IP "\fB\-\-exec\-app\fR [command]" 4
229 .IX Item "--exec-app [command]"
230 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.
231 .IP "\fB\-\-command\-title\fR command" 4
232 .IX Item "--command-title command"
233 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.
235 In fact, \fI\-\-exec\-title=tcsh\fR is equivalent to \fI\-\-command\-title='Exec cd \*(L"%d\*(R"; xterm \-e tcsh'\fR
237 The empty value disables the title action.
238 .IP "\fB\-\-command\-file\fR command" 4
239 .IX Item "--command-file command"
240 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.
242 In fact, \-\-exec\-file=vi is equivalent to \-\-command\-file='Exec xterm \-e vi \*(L"%f\*(R"'
243 .IP "\fB\-\-command\-app\fR command" 4
244 .IX Item "--command-app command"
245 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.
247 In fact, \-\-exec\-app=^exec is equivalent to \-\-command\-app='Exec exec \*(L"%f\*(R"'
248 .IP "\fB\-\-[no]reuse\fR" 4
249 .IX Item "--[no]reuse"
250 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.
251 .IP "\fB\-\-[no]check\-subdirs\fR" 4
252 .IX Item "--[no]check-subdirs"
253 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.
254 .IP "\fB\-\-special\-dirs\fR value" 4
255 .IX Item "--special-dirs value"
256 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.
257 .IP "\fB\-\-[no]memory\-for\-speed\fR" 4
258 .IX Item "--[no]memory-for-speed"
259 use speed optimization, i.e. use previously created directory menus without destroying it when closed, default is \-\-nomemory\-for\-speed
261 .Vb 2
262 \&    Warning: speed optimization takes up a lot of memory
263 \&    that is never free\*(Aqd again while fvwm is running.
265 .IP "\fB\-\-menu\-style\fR name" 4
266 .IX Item "--menu-style name"
267 assign MenuStyle name to the menus
268 .IP "\fB\-\-func\-name\fR name" 4
269 .IX Item "--func-name name"
270 overwrite the default MissingSubmenuFunction name that is \*(L"FuncFvwmMenuDirectory\*(R"
272 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.
273 .SH "USAGE"
274 .IX Header "USAGE"
275 Put this into your fvwm configuration file to invoke the script:
277 .Vb 2
278 \&  AddToFunc FuncFvwmMenuDirectory
279 \&  + I PipeRead "fvwm\-menu\-directory \-d \*(Aq$0\*(Aq"
282 More complex example:
284 .Vb 4
285 \&  # AddToFunc FuncFvwmMenuDirectory
286 \&  # + I PipeRead "fvwm\-menu\-directory \-d \*(Aq$0\*(Aq \-x \*(AqEterm \-g 80x40 \-e\*(Aq \e\e
287 \&    \-a \-l \-o 6 \-\-exec\-app \-\-exec\-title \*(Aqtcsh \-l\*(Aq \-\-exec\-file \*(Aqvim \-R\*(Aq \e\e
288 \&    \-t \*(AqGo to: %d\*(Aq \-\-wm\-icons"
291 And put this in the menu from which you want to pop-up the directory menus:
293 .Vb 3
294 \&  AddToMenu SomeMenu MissingSubmenuFunction FuncFvwmMenuDirectory
295 \&  + "Home Directory"  Popup $[HOME]
296 \&  + "Httpd Directory" Popup /home/httpd
299 Note: please use absolute path names.
301 It is a good idea to set the menu pop-up delay to something positive and enable busy cursor
303 .Vb 2
304 \&  MenuStyle * PopupDelayed, PopupDelay 200
305 \&  BusyCursor DynamicMenu True
308 in your configuration file when using this script for better results.
310 Another interesting usage (\f(CW\*(C`\-\-reuse\*(C'\fR or \f(CW\*(C`\-r\*(C'\fR is mandatary for this):
312 .Vb 4
313 \&  AddToMenu Browser
314 \&  + DynamicPopupAction PipeRead \e\e
315 \&    "fvwm\-menu\-directory \-r \-na Browser \-d / \-s"
316 \&  AddToMenu SomeMenu "My Browser" Menu Browser
319 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.
320 .SH "AUTHORS"
321 .IX Header "AUTHORS"
322 Inspired on 1999\-06\-07 by Dominik Vogt <domivogt@fvwm.org>.
324 Rewritten on 1999\-08\-05 by Mikhael Goikhman <migo@homemail.com>.
325 .SH "COPYING"
326 .IX Header "COPYING"
327 The script is distributed by the same terms as fvwm itself. See \s-1GNU\s0 General Public License for details.
328 .SH "BUGS"
329 .IX Header "BUGS"
330 Report bugs to fvwm\-bug@fvwm.org.