#
# FVWM-Crystal - main initialization file
#

# Where is the user-wide configuration
SetEnv FVWM_USERDIR $[HOME]/.fvwm-crystal

# Where is the system-wide configuration
SetEnv FVWM_CONFIGDIR /etc/X11/fvwm/fvwm-crystal

# Where are the system-wide files
SetEnv FVWM_SYSTEMDIR $.

# Where the distribution specific menu is located
SetEnv FVWM_DISTROMENUDIR /var/lib/fvwm-crystal

# Name of the distribution menu
SetEnv FVWM_DISTROMENUNAME debian

# Where are the locales
LocalePath $[FVWM_USERDIR]/locale;fvwm-crystal:$[FVWM_SYSTEMDIR]/locale;fvwm-crystal:+

# Check if there's an UTF-8 locale
Test (EnvMatch LANG *.UTF-8)	SetEnv FVWM_FLAG_UTF-8 1
Test (EnvMatch LANG *.utf-8)	SetEnv FVWM_FLAG_UTF-8 1
Test (EnvMatch LANG *.UTF8)	SetEnv FVWM_FLAG_UTF-8 1
Test (EnvMatch LANG *.utf8)	SetEnv FVWM_FLAG_UTF-8 1

# Load the standard functions (Include function doesn't work yet)
Read $[FVWM_SYSTEMDIR]/components/Standard

# Look if there is a recipe selected. If not, select the default
CheckPreferences LastChoosenRecipe "SavePreferences LastChoosenRecipe 'Include recipes/Default'"

# Load last used recipe
LoadPreferences LastChoosenRecipe

# Load user configuration file, if it's present
Include userconfig

# Debug line - uncomment to see it in the ~/.xsession-errors
#Echo -----8<----- Initialization finished -----8<-----

# vim:foldmethod=marker:foldenable:foldlevel=0:filetype=fvwm

