# FVWM-Crystal: main configuration file
# Written by: Maciej Delmanowski <harnir@linux.net.pl>

# Overview:
# Here is the main center. The Core. One of the most important of all
# important files on the Linux system. Second after the /boot/vmlinuz ;)
# All other files are loaded from here, you can find many settings and options
# below. Some of them may be moved to the other files, but the core will be
# here. Until next change of the configuration files ;)

# -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
# In this directory are held user and generated files (like files needed to
# remember certain settings)
SetEnv FVWM_USERDIR "$[HOME]/.fvwm"

# In this directory are held "system" config files, like colorsets,
# decorations, functions, etc.
SetEnv FVWM_CONFIGDIR $.

# -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
# Default desktop layout (just in case it's not set in user's files)
SetEnv DesktopLayout "$[FVWM_CONFIGDIR]/desktop-layouts/1.0"

# Because function files are not yet, loaded, we load Locales function file
# directly. After that, let's load the defaut locale.
Read $[FVWM_CONFIGDIR]/functions/Locales
LoadLocales


# -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
# Load all FVWM-Crystal function files and needed modules
PipeRead 'cat $[FVWM_CONFIGDIR]/functions/*'
Module FvwmCommandS

# -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
# Basic settings
# A small frame around the desktop...
EWMH-Desktop 3 3 3 3

# Default settings for the screen edge, in case user hasn't set them.
EdgeScroll              0       0
EdgeResistance          0       0

# Search for terminals installed in this system and select first found
FindCommand DefaultTerminal urxvt mrxvt aterm xterm
FindCommand QuakeConsoleTerminal urxvt mrxvt aterm xterm
FindCommand FvwmConsoleTerminal xterm aterm mrxvt urxvt

# -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
# Let's roll! :)

Clear-Default-Bindings
Initialize-DeployUserPreferences

Read $[FVWM_USERDIR]/user-preferences/start

Colorset-LoadLast
Decoration-LoadLast

Read $[DesktopLayout]/start

# Automatically create ApplicationPanel if it doesn't exists for selected
# desktop-layout
Generate-Applications

# vim:ft=fvwm
