1fvwm-menu-directory(1)          Fvwm Utilities          fvwm-menu-directory(1)
2
3
4

NAME

6       fvwm-menu-directory - builds a directory browsing menu for fvwm
7

SYNOPSIS

9       fvwm-menu-directory [ --help-h-? ] [ --version-V ] [ --name-na NAME
10       ] [ --title-t NAME ] [ --item-it NAME ] [ --icon-title-icon-t XPM ]
11       [ --icon-dir-icon-d XPM ] [ --icon-file-icon-f XPM ] [
12       --icon-app-icon-a XPM ] [ --wm-icons ] [ --dir-d NAME ] [ --order-o
13       NUM ] [ --[no]all-a ] [ --[no]links-l ] [ --xterm-x CMD ] [
14       --exec-title-exec-t CMD ] [ --exec-file-exec-f CMD ] [
15       --exec-app-exec-a [CMD] ] [ --command-title-command-t CMD ] [ --com‐
16       mand-file-command-f CMD ] [ --command-app-command-a CMD ] [ --[no]re‐
17       use-r ] [ --[no]check-subdirs-ch ] [ --special-dirs-s [VALUE] ] [
18       --[no]memory-for-speed-mem ] [ --menu-style-men NAME ] [
19       --func-name-f NAME ]
20

DESCRIPTION

22       A perl script which provides an output to read in with PipeRead to
23       build an fvwm menu containing a directory listing. Almost everything
24       can be configured.
25

HINTS

27       The title item with its own attached action is usually added to the
28       menu.  This may be used to define an action for the directory for which
29       the menu is built, such as starting a terminal in this directory (the
30       default).  However, this may annoy some users. To disable the title
31       action use --command-title "", to remove the title completely use
32       --title "".
33

OPTIONS

35       --help
36           show the usage and exit
37
38       --version
39           show version and exit
40
41       --name name
42           menu name, used only with --reuse, default is MenuBrowser
43
44       --title title
45           menu title format, default is '%*-40p' - last 40 characters of the
46           current full path.  TAB can be specified as '\t', but in .fvwm2rc
47           you should specify a double backslash or a real TAB.
48
49           Format specifiers:
50             %d - the current directory name
51             %p - the current directory full path
52
53           These specifiers can receive an optional integer size, positive for
54           right adjusted string or negative for left adjusted, example: %8x;
55           and optional *num or *-num, which means to leave only the first or
56           last (if minus) num of chars, the num must be greater than 3, since
57           the striped part is replaced with "...", example: %*30x. Both can
58           be combined: %-10*-20x, this instructs to get only the 20 last
59           characters, but if the length is less then 10 - to fill with up to
60           10 spaces on the right.
61
62       --item format
63           menu item format, default is '%n'. TAB and width modifiers for %n,
64           %N and %s can be specified as described in --title above.  Note,
65           specifying a non default format slows the script.
66
67           Format specifiers:
68
69             %n - file/dir name (without the path)
70             %N - file/dir name (full with the path)
71             %d - file/dir date (yyyy-mm-dd HH:MM:SS)
72             %D - file/dir date (yyyy-mm-dd)
73             %s - file/dir size (in bytes)
74             %t - file/dir type (File⎪Dir ⎪Link⎪Sock⎪Blck⎪Char⎪Pipe)
75             %T - file/dir type (F⎪D⎪L⎪S⎪B⎪C⎪P)
76
77           Example: --title '%*-40p\tDate, Type\tSize' --item '%*40n\t%d
78           %t\t%s'
79
80       --icon-title icon
81           menu title icon, default is none
82
83       --icon-dir icon
84           menu dir icon, default is none
85
86       --icon-file icon
87           menu file icon, default is none
88
89       --icon-app icon
90           menu application icon, default is none
91
92       --wm-icons
93           define icon names suitable for use with wm-icons package.  Cur‐
94           rently this is equivalent to: --icon-title menu/folder-open.xpm
95           --icon-item menu/file.xpm --icon-dir menu/folder.xpm --icon-app
96           menu/utility.xpm.
97
98       --dir dir
99           starting dir, default is ${HOME-.}
100
101       --order number
102           in the range (-6 .. 6), default is 5:
103
104             1 - do not sort,  2 - dirs first, 3 - files first
105             4 - sort by name, 5 - dirs first, 6 - files first
106             Negative number represents reverse order.
107
108       --[no]all
109           show hidden files, like in 'ls -A', default is --noall
110
111       --[no]links
112           follow linked directories, default is --nolinks
113
114       --xterm command
115           X terminal call, default is 'xterm -e'
116
117       --exec-title command
118           an fvwm Exec command on directory title (usually the shell),
119           default is ${SHELL-/bin/sh}.  '-' means no Exec command, i.e. Nop.
120           If the command is not started with '^' X terminal call is
121           prepended.  The command is started in the currently browsed direc‐
122           tory.
123
124       --exec-file command
125           an fvwm Exec command on regular files, default is ${EDITOR-vi}.
126           '-' means no Exec command, i.e. Nop.  If the command is not started
127           with '^' X terminal call is prepended.  The actual file name is
128           appended to the command.
129
130       --exec-app [command]
131           an fvwm Exec command on +x files, default is '-', which means the
132           same command as on regular files. If no command is given, it is
133           assumed to be empty - simply run the +x file.  If the command is
134           not started with '^' X terminal call is prepended.  The actual file
135           name is appended to the command.
136
137       --command-title command
138           an fvwm command to execute on title.  If this option is not given
139           (or command is '-'), the "--exec-title" is used instead.  In the
140           command, %d is substituted with the full directory path.
141
142           In fact, --exec-title=tcsh is equivalent to --command-title='Exec
143           cd "%d"; xterm -e tcsh'
144
145           The empty value disables the title action.
146
147       --command-file command
148           an fvwm command to execute on regular files.  If this option is not
149           given (or command is '-'), the "--exec-file" is used instead.  In
150           the command, %f is substituted with the full file path.
151
152           In fact, --exec-file=vi is equivalent to --command-file='Exec xterm
153           -e vi "%f"'
154
155       --command-app command
156           an fvwm command to execute on +x files.  If this option is not
157           given (or command is '-'), the "--command-app" is used instead.  In
158           the command, %f is substituted with the full file path.
159
160           In fact, --exec-app=^exec is equivalent to --command-app='Exec exec
161           "%f"'
162
163       --[no]reuse
164           no pop-up menus, reuse the same menu, default is --noreuse.  When
165           you specify this option the Menu action is used, not Popup. Also,
166           the --name parameter is not ignored, and --dir parameter is ignored
167           if there is ~/.fvwm/.fvwm-menu-directory.dir file. This file is
168           only created or used with this option specified, it is the only
169           solution for the current fvwm menu state.
170
171       --[no]check-subdirs
172           check all subdirs for having execute (+x) permission and replace
173           "Popup"/"Menu" command with "Nop" for these without permissions.
174           This has a visual effect of disabling popup triangle in the subdi‐
175           rectory item.  The default is --nocheck-subdirs, because: 1)
176           enabling this slows a bit the script, 2) with this option enabled,
177           if no icons used and no dir/file separate sorting used there is no
178           way to know that the item is directory and not file.
179
180       --special-dirs value
181           add .. or ~ or / special directories according to given optional
182           value. Without with option these directories are not added.
183           Default value if not specified is "1,2". The value is comma sepa‐
184           rated ordered special directory indexes, where 1 is parent direc‐
185           tory, 2 is home directory, 3 is root directory. If minus is
186           prepended to the value, special directories are added at the bottom
187           of menu instead of top. Value "0" or any bad value is equivalent to
188           non-specifying this option at all.
189
190       --[no]memory-for-speed
191           use speed optimization, i.e. use previously created directory menus
192           without destroying it when closed, default is --nomemory-for-speed
193
194               Warning: speed optimization takes up a lot of memory
195               that is never free'd again while fvwm is running.
196
197       --menu-style name
198           assign MenuStyle name to the menus
199
200       --func-name name
201           overwrite the default MissingSubmenuFunction name that is
202           "FuncFvwmMenuDirectory"
203
204       Option parameters can be specified either using '=' or in the next
205       argument.  Short options are ok if not ambiguous: "-a", "-x",
206       "-icon-f"; but be careful with short options, what is now unambiguous,
207       can become ambiguous in the next versions.
208

USAGE

210       Put this into your fvwm configuration file to invoke the script:
211
212         AddToFunc FuncFvwmMenuDirectory
213         + I PipeRead "fvwm-menu-directory -d '$0'"
214
215       More complex example:
216
217         # AddToFunc FuncFvwmMenuDirectory
218         # + I PipeRead "fvwm-menu-directory -d '$0' -x 'Eterm -g 80x40 -e' \\
219           -a -l -o 6 --exec-app --exec-title 'tcsh -l' --exec-file 'vim -R' \\
220           -t 'Go to: %d' --wm-icons"
221
222       And put this in the menu from which you want to pop-up the directory
223       menus:
224
225         AddToMenu SomeMenu MissingSubmenuFunction FuncFvwmMenuDirectory
226         + "Home Directory"  Popup $[HOME]
227         + "Httpd Directory" Popup /home/httpd
228
229       Note: please use absolute path names.
230
231       It is a good idea to set the menu pop-up delay to something positive
232       and enable busy cursor
233
234         MenuStyle * PopupDelayed, PopupDelay 200
235         BusyCursor DynamicMenu True
236
237       in your configuration file when using this script for better results.
238
239       Another interesting usage ("--reuse" or "-r" is mandatary for this):
240
241         AddToMenu Browser
242         + DynamicPopupAction PipeRead \\
243           "fvwm-menu-directory -r -na Browser -d / -s"
244         AddToMenu SomeMenu "My Browser" Menu Browser
245
246       Here the "--dir" parameter (starting directory) is ignored if there is
247       ~/.fvwm/.fvwm-menu-directory.dir file, which you can delete.
248

AUTHORS

250       Inspired  on 1999-06-07 by Dominik Vogt     <domivogt@fvwm.org>.
251
252       Rewritten on 1999-08-05 by Mikhael Goikhman <migo@homemail.com>.
253

COPYING

255       The script is distributed by the same terms as fvwm itself.  See GNU
256       General Public License for details.
257

BUGS

259       Report bugs to fvwm-bug@fvwm.org.
260
261
262
263perl v5.8.5                       2005-07-08            fvwm-menu-directory(1)
Impressum