Correctly Configure roots on monitor change
[clfswm.git] / load.lisp
blob826997d586f466d16afb32f1421892b7ebbfc6c2
1 ;;; --------------------------------------------------------------------------
2 ;;; CLFSWM - FullScreen Window Manager
3 ;;;
4 ;;; --------------------------------------------------------------------------
5 ;;; Documentation: System loading functions
6 ;;; --------------------------------------------------------------------------
7 ;;;
8 ;;; (C) 2005 Philippe Brochard <hocwp@free.fr>
9 ;;;
10 ;;; This program is free software; you can redistribute it and/or modify
11 ;;; it under the terms of the GNU General Public License as published by
12 ;;; the Free Software Foundation; either version 3 of the License, or
13 ;;; (at your option) any later version.
14 ;;;
15 ;;; This program is distributed in the hope that it will be useful,
16 ;;; but WITHOUT ANY WARRANTY; without even the implied warranty of
17 ;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
18 ;;; GNU General Public License for more details.
19 ;;;
20 ;;; You should have received a copy of the GNU General Public License
21 ;;; along with this program; if not, write to the Free Software
22 ;;; Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
23 ;;;
24 ;;; --------------------------------------------------------------------------
26 (pushnew :clfswm-build *features*)
27 (pushnew :clfswm-dump *features*)
28 (pushnew :clfswm-start *features*)
29 (pushnew :clfswm-install *features*)
31 ;;;;;; Uncomment lines above to build the default documentation.
32 ;;(pushnew :clfswm-build-doc *features*)
35 (defparameter *base-dir* (directory-namestring *load-truename*))
36 (export '*base-dir*)
39 #+CMU
40 (setf ext:*gc-verbose* nil)
43 ;;;; Loading ASDF
44 #+(or SBCL ECL)
45 (require :asdf)
48 #-ASDF
49 (load (make-pathname :host (pathname-host *base-dir*)
50 :device (pathname-device *base-dir*)
51 :directory (append (pathname-directory *base-dir*) (list "contrib"))
52 :name "asdf" :type "lisp"))
54 (push *base-dir* asdf:*central-registry*)
60 #+(or CMU ECL)
61 (require :clx)
63 #+(AND CLISP (not CLX))
64 (when (fboundp 'require)
65 (require "clx.lisp"))
67 #-ASDF
68 (load (make-pathname :host (pathname-host *base-dir*)
69 :device (pathname-device *base-dir*)
70 :directory (append (pathname-directory *base-dir*) (list "contrib"))
71 :name "asdf" :type "lisp"))
73 (push *base-dir* asdf:*central-registry*)
75 ;;(setf asdf:*verbose-out* t)
77 ;;;; Uncomment the line above if you want to follow the
78 ;;;; handle event mecanism.
79 ;;(pushnew :event-debug *features*)
81 (asdf:oos 'asdf:load-op :clfswm)
83 (in-package :clfswm)
85 #-:clfswm-build-doc
86 (ignore-errors
87 (main :read-conf-file-p t))
90 #+:clfswm-build-doc
91 (ignore-errors
92 (main :read-conf-file-p nil)
93 (produce-all-docs))
96 ;;; For debuging: start another sever (for example: 'startx -- :1'), Xnest
97 ;;; or Zephyr and add the lines above in a dot-clfswmrc-debug file
98 ;;; mod-2 is the numlock key on some keyboards.
99 ;;(setf *default-modifiers* '(:mod-2))
101 ;;(defun my-add-escape ()
102 ;; (define-main-key ("Escape" :mod-2) 'exit-clfswm))
104 ;;(add-hook *binding-hook* 'my-add-escape)
106 ;;(clfswm:main :display ":1" :alternate-conf #P"/where/is/dot-clfswmrc-debug")