FVWM-MENU-DIRECTORY(1) | FVWM-MENU-DIRECTORY(1) |
NAME¶
fvwm-menu-directory - builds a directory browsing menu for fvwm
SYNOPSIS¶
fvwm-menu-directory [ --help|-h|-? ] [ --version|-V ] [ --name|-na NAME ] [ --title|-t NAME ] [ --item|-it NAME ] [ --icon-title|-icon-t XPM ] [ --icon-dir|-icon-d XPM ] [ --icon-file|-icon-f XPM ] [ --icon-app|-icon-a XPM ] [ --wm-icons ] [ --dir|-d NAME ] [ --order|-o NUM ] [ --[no]all|-a ] [ --[no]links|-l ] [ --xterm|-x CMD ] [ --exec-title|-exec-t CMD ] [ --exec-file|-exec-f CMD ] [ --exec-app|-exec-a [CMD] ] [ --command-title|-command-t CMD ] [ --command-file|-command-f CMD ] [ --command-app|-command-a CMD ] [ --[no]reuse|-r ] [ --[no]check-subdirs|-ch ] [ --special-dirs|-s [VALUE] ] [ --[no]memory-for-speed|-mem ] [ --menu-style|-men NAME ] [ --func-name|-f NAME ]
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.
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 --command-title "", to remove the title completely use --title "".
OPTIONS¶
--help
--version
--name name
--title title
Format specifiers: %d - the current directory name %p - the current directory full path.
These specifiers can receive an optional integer size, positive for right adjusted string or negative for left adjusted, example: %8x; 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 ..., 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.
--item format
Format specifiers:
%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)
Example: --title '%*-40p\tDate, Type\tSize' --item '%*40n\t%d %t\t%s'
--icon-title icon
--icon-dir icon
--icon-file icon
--icon-app icon
--wm-icons
--dir dir
--order number
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.
--[no]all
--[no]links
--xterm command
--exec-title command
--exec-file command
--exec-app [command]
--command-title command
In fact, --exec-title=tcsh is equivalent to --command-title='Exec cd %d; xterm -e tcsh'.
The empty value disables the title action.
--command-file command
In fact, --exec-file=vi is equivalent to --command-file='Exec xterm -e vi %f'.
--command-app command
In fact, --exec-app=^exec is equivalent to --command-app='Exec exec %f'.
--[no]reuse
--[no]check-subdirs
--special-dirs value
--[no]memory-for-speed
Warning: speed optimization takes up a lot of memory that is never freed again while fvwm is running.
--menu-style name
--func-name name
Option parameters can be specified either using '=' or in the next argument. Short options are ok if not ambiguous: -a, -x, -icon-f; but be careful with short options, what is now unambiguous, can become ambiguous in the next versions.
USAGE¶
Put this into your fvwm configuration file to invoke the script:
AddToFunc FuncFvwmMenuDirectory + I PipeRead "fvwm-menu-directory -d $0"
More complex example:
AddToFunc FuncFvwmMenuDirectory + I PipeRead "fvwm-menu-directory -d '$0' -x 'Eterm -g 80x40 -e' \\
-a -l -o 6 --exec-app --exec-title 'tcsh -l' \\
--exec-file 'vim -R' -t 'Go to: %d' --wm-icons"
And put this in the menu from which you want to pop-up the directory menus:
AddToMenu SomeMenu MissingSubmenuFunction FuncFvwmMenuDirectory + "Home Directory" Popup $[HOME] + "Httpd Directory" Popup /home/httpd
Note: please use absolute path names.
It is a good idea to set the menu pop-up delay to something positive and enable busy cursor
MenuStyle * PopupDelayed, PopupDelay 200 BusyCursor DynamicMenu True
in your configuration file when using this script for better results.
Another interesting usage ('--reuse' or '-r' is mandatory for this):
AddToMenu Browser + DynamicPopupAction PipeRead \\
"fvwm-menu-directory -r -na Browser -d / -s" AddToMenu SomeMenu "My Browser" Menu Browser
Here the '--dir' parameter (starting directory) is ignored if there is ~/.fvwm/.fvwm-menu-directory.dir file, which you can delete.
AUTHORS¶
Inspired on 1999-06-07 by Dominik Vogt <domivogt@fvwm.org>.
Rewritten on 1999-08-05 by Mikhael Goikhman <migo@homemail.com>.
COPYING¶
The script is distributed by the same terms as fvwm itself. See GNU General Public License for details.
BUGS¶
Report bugs to <fvwm-workers@fvwm.org> or <https://github.com/fvwmorg/fvwm3>.
2024-07-25 |