# Written by: Maciej Delmanowski <harnir@linux.net.pl>

# Overview:
# In this file you can find some functions used in FVWM-Crystal to launch
# applications. They are provided here for easier global change (you don't
# need to edit, for example, every entry in ApplicationDatabase to change
# a terminal type). You can use those commands in FvwmConsole window (by
# default in the bottom-left corner of the screen, accesible by pressing
# Alt+;).
# Near the functions you can find commented out entries, from which you can
# choosed a preffered command.

# Functions:

# A
# Launches a terminal with optional program as an argument. Terminal settings
# should be set using ~/.Xresources file or (in Eterm) theme file.

# AA
# A special version of the 'A' function. It just opens a terminal without
# additional application launched in it. It exists because certain terminal
# emulators (xterm, Eterm, something else?) won't run with '-e' argument being
# null.

# X
# Launches a command in the background. Typically this function is used to
# launch some X application without additional terminal window.

# M
# Starts selected mail client

# E
# Launch a text editor with specified file. If a text editor is a "terminal"
# type, it should be launched in the terminal.

# S
# Launch a command using 'sudo'. You need to have provileges in /etc/sudoers
# file to execute choosen command - consult your administrator or man sudo,
# man sudoers, man visudo. Usually 'sudo' asks for a password, so it's a good
# choice to launch it in a terminal window (otherwise you should use
# a specialized program for password verification).

# SE
# A combination of 'E' and 'S' function, quick way to launch a text editor
# using 'sudo'. You need a permission to launch selected editor in
# /etc/sudoers file. If you don't use a special program to verify a password,
# it's A Good Thing to use a terminal for that purpuose.


# Usage: A [command] [command options]
DestroyFunc A
AddToFunc A
+ I	Exec exec aterm -e $*
#+ I	Exec exec xterm -e $*
#+ I	Exec exec Eterm -e $*
#+ I	Exec exec gnome-terminal -e $*
#+ I	Exec exec multi-gnome-terminal -e $*
#+ I	Exec exec konsole -e $*

DestroyFunc AA
AddToFunc AA
+ I	Exec exec aterm
#+ I	Exec exec xterm
#+ I	Exec exec Eterm
#+ I	Exec exec gnome-terminal
#+ I	Exec exec multi-gnome-terminal
#+ I	Exec exec konsole

# Usage: X [command] [command options]
DestroyFunc X
AddToFunc X
+ I	Exec exec $*

DestroyFunc M
AddToFunc M
+ I	A mutt
#+ I	A pine
#+ I	X evolution
#+ I	X mozilla --mail
#+ I	X thrunderbird
#+ I	X sylpheed-claws

# Usage: E [file to edit]
DestroyFunc E
AddToFunc E
#+ I	A editor $*	# Use Debian "alternatives" system
#+ I	A vi $*
+ I	A vim $*
#+ I	X gvim $*
#+ I	X kvim $*
#+ I	A emacs $*
#+ I	X xemacs $*
#+ I	A jed $*
#+ I	X xjed $*
#+ I	A joe $*
#+ I	A mcedit $*

# Usage: S [command] [command options]
DestroyFunc S
AddToFunc S
+ I	A sudo $*

# Usage: SE [file to edit]
DestroyFunc SE
AddToFunc SE
#+ I	S vi $*
+ I	S vim $*
#+ I	S gvim $*
#+ I	S kvim $*
#+ I	S emacs $*
#+ I	S xemacs $*
#+ I	S jed $*
#+ I	S xjed $*
#+ I	S joe $*
#+ I	S mcedit $*

