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

USAGE

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

AUTHORS

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

COPYING

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

BUGS

258       Report bugs to fvwm-bug@fvwm.org.
259
260
261
2622.5.28 (from cvs)                 2009-03-22            fvwm-menu-directory(1)
Impressum