###############################################################################################
#
# vfu.conf
# VFU File Manager config file
# (c) Vladi Belperchinov-Shabaski 1997-2009
# <cade@biscom.net>   <cade@datamax.bg>   <cade@epay.bg>
# http://soul.datamax.bg/~cade/vfu
# http://cade.datamax.bg/vfu/
#
###############################################################################################
#
# All lines with first character # or ; are considered comments!
# Comments may start on a separated new line only! (i.e. comment chars must be first in line)
# This file is read-only! vfu never writes to it.
#
# Possible locations for this file are:
#
# $HOME/.vfu/vfu.conf
# $HOME/$RC_PREFIX/vfu/vfu.conf   ( please read CONFIG file )
# /etc/vfu.conf
# /usr/local/etc/vfu.conf
# /usr/local/vfu.conf
#


# comment out folowing lines to use vfu's internal editor and viewer
# or you can toggle em run-time if you wish so
Browser=less %f
Editor=joe %f
Diff=diff -u

# alternative ones:
#Editor=vi %f
#Editor=~/apps/zed/zed %f

# list of known archive types, these are just for recognizing
# handling is done via rx_* scripts! but not by VFU itself
Archive=*.zip
Archive=*.pk3
Archive=*.maff
Archive=*.jar
Archive=*.tar.gz
Archive=*.tgz
Archive=*.tar.Z
Archive=*.tar.bz2
Archive=*.tar
Archive=*.rar
Archive=*.deb
Archive=*.ftp
Archive=*.rpm

#
# if you'd like to restrict VFU when walking the directory tree -- list paths
# here. Note that you usually should add at least `/tmp/' and `/proc/'
# format is `:' separated list of directory prefixes
#
TrimTree=/dev/:/proc/:/tmp/:/dos/:/a/

###############################################################################################
# user external commands (handlers), format is:
# description,keyname,ext.mask,command
#
# to execute a command VFU will try to match both
# key pressed and current file's extension!
#
# 1. `description' is just free text, keep it small, first letter can be used as menu hotkey
# 2. `keyname' is key you want to bind
# 3. `ext.mask' is dot-separated list of required extensions and/or file type strings
#               or `*' to discard file type and run command for all files
#               (don't be confused with `.**.' which stands for `executable' files)
# 4. `command' is the shell line you want to execute (as on the command prompt for example)
#
# Available keys (keynames) are:
#     ENTER, INSERT, F1..F10, @F1..@F10, #F1..#F10, ^F1..^F10
#     (#=shift, @=alt, ^=ctrl, note: ^KEY and @KEY are not available under Linux)
#
# NOTE: You can use keyname `MENU' to attach this command to the `UserMenu' (key U in vfu)
# NOTE: `file type strings' are the strings that VFU shows in the `TP' column in the file,
#       list. Here is a list of the file type strings:
#         **  -- executable file
#         []  -- directory
#         ->  -- symbolic link
#         <>  -- symbolic link to directory
#         ==  -- block device
#         ++  -- character device
#         ()  -- fifo (pipe)
#         ##  -- socket
#       You can mix file extensions with file type strings in the same mask.
#       There is a special mask called `dotfiles' which will match dotfiles (wiles named
#       with leading dot -- `.dotname' )
# NOTE: You cannot mask longer extensions like `.tar.gz' for example.
#
# `Command' string (shell line) can contain following macros:
#
#         %f  -- replaced w. current filename (w/o path)
#         %F  -- replaced w. full pathname of the current file
#         %g  -- same as %f but for each selected filename
#         %G  -- same as %F but for each selected filename
#                %g and %G produce list of filenames. each filename
#                is surrounded by '
#                if filename contains ' then " is used.
#                example: 'file1' "file2's" 'file"3"' ...
#         %e  -- current file name without extension
#         %E  -- current file extension
#         %s  -- current file size
#         %c  -- current path ( with slash at the end )
#         %C  -- startup path ( with slash at the end )
#         %R  -- re-read directory content after shell
#         %?  -- prompt for user input and replace it in
#         %i  -- simulates DownArrow after execution
#         %n  -- don't clear and redraw screen on user external command
#         %w  -- wait a key after shell. replaced w. `' (i.e. empty string)
#         %x  -- replaced w. `x'.
#         %_  -- use short file names (SFN) for %f and %F (DOS only)
#         %\  -- use backslashes for %f and %F (DOS only)
#         %!  -- request shell line to be shown before execution (debug mode)
#

# view JPEGs and GIFs -- you can move this to the SEE filters below
#ux=SEE JPEG,INSERT,.jpg.jpeg.gif.,seejpeg -w -F G640x480x256 -c "%f"
ux=SEE JPEG,ENTER,.JPG.jpg.JPEG.jpeg.gif.xpm.png.,qvv "%f" 2> /dev/null &
ux=SEE GNUMERIC,ENTER,.xls.gnumeric.,gnumeric "%f" 2> /dev/null &

# view HTML documents -- now moved to SEE filters below
ux=SEE HTML,ENTER,.htm.html.shtml.,lynx "%F"
ux=SEE HTML,INSERT,.htm.html.shtml.,lynx "%F"

#ux=PLAY WAV,ENTER ,.au.wav.WAV.,killall mpg123 play 2> /dev/null; play "%f" %i  %n 1> /dev/null 2> /dev/null &
#ux=PLAY WAV,INSERT,.au.wav.WAV.,play "%f" %i%n 1> /dev/null 2> /dev/null &
#ux=PLAYMP3,ENTER,.ogg.mp3.wav.,killall mpg123 play 2> /dev/null; mpg123 -b 1024 "%f" %i 1> /dev/null 2> /dev/null &

# run xmms with all selected files
ux=PLAY MP3,ENTER,.ogg.mp3.wav.,xmms "%f" %i 1> /dev/null 2> /dev/null &
# if you want to run only pointed one, then replace %g with %f like in the next line:
# ux=PLAY MP3,ENTER,.ogg.mp3.wav.,xmms "%f" %i 1> /dev/null 2> /dev/null &

# run xmms with all mp3/wav files in the current directory
ux=PLAY MP3,INSERT,*,xmms *.mp3 *.wav 1> /dev/null 2> /dev/null &

# view PDF and PS document
ux=VIEW PDF,ENTER,.pdf.PDF.,acroread "%f" 1> /dev/null 2> /dev/null &
ux=VIEW PS,ENTER,.ps.,gv "%f"&

#
ux=VIEW TAR,INS,.gz.,gunzip -c "%f" | tar tvf - | less

# view man pages -- note you can add and see filter for this
ux=VIEW MAN,ENTER,.1.2.3.4.5.6.7.8.,man "%F"

# play mpeg's
#ux=PLAY MPEG,ENTER,.mpg.MPG.mpeg.,plaympeg "%f"  1> /dev/null &
#ux=PLAY MPEG,INS,.mpg.MPG.mpeg.,plaympeg -2 "%f" 1> /dev/null &
ux=PLAY MPEG,ENTER,.mpg.MPG.mpeg.asf.avi.mov.wmv.,mplayer "%f"  1> /dev/null 2> /dev/null &
ux=PLAY MPEG,INS,.mpg.mpeg.asf.avi.mov.wmv.,mplayer "%f" 1> /dev/null 2> /dev/null
ux=PLAY REAL,ENTER,.rm.,realplay "%f"  1> /dev/null 2> /dev/null &

# other applications
ux=EDIT GNUMERIC,ENTER,.gnumeric.,gnumeric "%f" 1> /dev/null 2> /dev/null &

#
# following user commands are bound to the UserMenu -- key `u'
# note that instead of keyname there's `menu' string!
# first letter is hotkey!
#
ux=lLocate file,menu,*,locate %? %w
ux=---,menu,*,
ux=ompg123: Stop,menu,*,killall -TERM mpg123 1> /dev/null 2> /dev/null &
ux=smpg123: Suspend,menu,*,killall -STOP mpg123 1> /dev/null 2> /dev/null &
ux=cmpg123: Continue,menu,*,killall -CONT mpg123 1> /dev/null 2> /dev/null &
ux=vmpg123: View running/queue,menu,*,ps xeo "%%p %%a" | grep mpg123 | grep -v grep | less
ux=---,menu,*,
ux=GGQView Here,menu,*,gqview . 1> /dev/null 2> /dev/null &

#
# aditional examples:
#

# edit with kwrite ( > /dev/null -- all os text messages )
# NOTE: `*' means for any file (regardless type)
ux=KWRITE EDIT,F6,*,kwrite "%f" 2> /dev/null 1> /dev/null %n &
ux=GIMP EDIT,F7,.gif.jpg.png.xcf.,gimp-remote "%f" 2> /dev/null 1> /dev/null %n &
# ux=SLICK EDIT,F7,*,vs '%f' 2> /dev/null 1> /dev/null %n &
ux=KATE EDIT,F7,*,e '%f' 2> /dev/null 1> /dev/null %n &

# execute all files that have type `**' with ENTER
ux=EXEC,ENTER,.**.,"%f"
# same as the one before but executes command in background
ux=EXEC,INSERT,.**.,"%f"&

###############################################################################################
# the `see' file browser/viewer filters
# the format is:
# file-mask,command
# 1. `file-mask' tells which files should be filtered
# 2. `command' is executed and it's output is piped to temporary file which is
#              viewed by the viewer (You have to specify %f in the command)
#
see=*.html.gz,(gzip -dc "%f" > /tmp/vfu.temp.000.html; lynx -dump /tmp/vfu.temp.000.html; rm /tmp/vfu.temp.000.html )
see=*.[1234567890].gz,man "%F"
see=*.gz,gzip -dc "%f"
see=*.bz2,bzip2 -dc "%f"
see=*.Z,gzip -dc "%f"
see=*.[1234567890],man "%F"
see=*.htm,lynx -dump "%f"
see=*.html,lynx -dump "%f"
see=*.shtml,lynx -dump "%f"
see=*.dbf,dbfdump -2 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 "%f"

see=*.jpg,exiftags '%f'
see=*.JPG,exiftags '%f'

# this is a hack to view Qt man pages
see=*.[1234567890][a-zA-Z]t?,man "%F"

###############################################################################################
# external panelizers -- added to RescanMenu ( key ALT+R )
# first letter is hotkey!
# format is:
# description,command
# 1. `description' is free text describing panelizer command
# 2. `command' is processed just like any other external command, so
#              you can use the shell-macros described above. Note that
#              first letter of description is used for menu hotkey!
#
panelize=xExternal panelize command,%?
panelize=yFind all symlink files...,find . -type l
panelize=lLocate file,locate %?

###############################################################################################
# directory bookmarks -- press ALT+2 to change current dir to `/tmp' etc...
#
bookmark=/etc/
bookmark=/home/cade/
bookmark=/tmp/
bookmark=/usr/src/
bookmark=/usr/local/lib/X11/icewm/
# :)

###############################################################################################
# file extensions colors, format is .ext.ext.ext....ext.
# NOTE: this is extensions list, use dots to separate and at the end
#
cMAGENTA=.**.txt.rc.
cGREEN=.jpeg.jpg.lbm.xpm.tif.gif.png.
cCYAN=.[].<>.h.c.cpp.cc.cxx.pas.pl.
cRED=.dotfiles.
cYELLOW=.uc2.zip.arj.tgz.tar.rar.lzh.j.ha.lim.gz.Z.bz2.deb.
cBLUE=.==.++.().##.

###############################################################################################
# high colors
# NOTE: this mode currently is not available!
#
#chMAGENTA=
#chGREEN=
#chCYAN=
#chYELLOW=.1.2.3.4.5.6.7.8.
#chBLUE=

###############################################################################################
# EOF vfu.conf
###############################################################################################

