Skip to content
load.lisp 2.98 KiB
Newer Older
Philippe Brochard's avatar
Philippe Brochard committed
;;; --------------------------------------------------------------------------
;;; CLFSWM - FullScreen Window Manager
;;;
;;; --------------------------------------------------------------------------
;;; Documentation: System loading functions
;;; --------------------------------------------------------------------------
;;;
;;; (C) 2005 Philippe Brochard <hocwp@free.fr>
;;;
;;; This program is free software; you can redistribute it and/or modify
;;; it under the terms of the GNU General Public License as published by
;;; the Free Software Foundation; either version 3 of the License, or
;;; (at your option) any later version.
;;;
;;; This program is distributed in the hope that it will be useful,
;;; but WITHOUT ANY WARRANTY; without even the implied warranty of
;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
;;; GNU General Public License for more details.
;;;
;;; You should have received a copy of the GNU General Public License
;;; along with this program; if not, write to the Free Software
;;; Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
;;;
;;; --------------------------------------------------------------------------

(pushnew :clfswm-build *features*)
(pushnew :clfswm-dump *features*)
(pushnew :clfswm-start *features*)
(pushnew :clfswm-install *features*)
;;;;;; Uncomment lines above to build the default documentation.
;;(pushnew :clfswm-build-doc *features*)
Philippe Brochard's avatar
Philippe Brochard committed
(defparameter *base-dir* (directory-namestring *load-truename*))
(export '*base-dir*)

Philippe Brochard's avatar
Philippe Brochard committed
#+CMU
(setf ext:*gc-verbose* nil)


;;;; Loading ASDF
Philippe Brochard's avatar
Philippe Brochard committed
(require :asdf)


#-ASDF
(load (make-pathname :host (pathname-host *base-dir*)
		     :device (pathname-device *base-dir*)
		     :directory (append (pathname-directory *base-dir*) (list "contrib"))
		     :name "asdf" :type "lisp"))

(push *base-dir* asdf:*central-registry*)





Philippe Brochard's avatar
Philippe Brochard committed
(require :clx)

#+(AND CLISP (not CLX))
(when (fboundp 'require)
  (require "clx.lisp"))

Philippe Brochard's avatar
Philippe Brochard committed
#-ASDF
(load (make-pathname :host (pathname-host *base-dir*)
		     :device (pathname-device *base-dir*)
		     :directory (append (pathname-directory *base-dir*) (list "contrib"))
		     :name "asdf" :type "lisp"))

(push *base-dir* asdf:*central-registry*)

;;(setf asdf:*verbose-out* t)

;;;; Uncomment the line above if you want to follow the
;;;; handle event mecanism.
;;(pushnew :event-debug *features*)
Philippe Brochard's avatar
Philippe Brochard committed

(asdf:oos 'asdf:load-op :clfswm)

(in-package :clfswm)

#-:clfswm-build-doc
Philippe Brochard's avatar
Philippe Brochard committed
  (main :read-conf-file-p t))
#+:clfswm-build-doc
Philippe Brochard's avatar
Philippe Brochard committed
(ignore-errors
  (main :read-conf-file-p nil)
  (produce-all-docs))
;;; For debuging: start another sever (for example: 'startx -- :1'), Xnest
;;; or Zephyr and add the lines above in a dot-clfswmrc-debug file
;;; mod-2 is the numlock key on some keyboards.
;;(setf *default-modifiers* '(:mod-2))
;;
;;(defun my-add-escape ()
;;  (define-main-key ("Escape" :mod-2) 'exit-clfswm))
;;
;;(add-hook *binding-hook* 'my-add-escape)
;;
;;(clfswm:main :display ":1" :alternate-conf #P"/where/is/dot-clfswmrc-debug")