[clfswm-cvs] r16 - clfswm

pbrochard at common-lisp.net pbrochard at common-lisp.net
Thu Mar 6 14:47:34 UTC 2008


Author: pbrochard
Date: Thu Mar  6 09:47:33 2008
New Revision: 16

Modified:
   clfswm/README
   clfswm/clfswm-layout.lisp
   clfswm/clfswm-util.lisp
   clfswm/clfswm.lisp
   clfswm/load.lisp
   clfswm/package.lisp
Log:
Specify the base directory in the main loop. The main loop has key parameters

Modified: clfswm/README
==============================================================================
--- clfswm/README	(original)
+++ clfswm/README	Thu Mar  6 09:47:33 2008
@@ -44,9 +44,10 @@
 To change the default keybinding, have a look at the bindings*.lisp
 files and at the config.lisp file for global variables.
 
-All variables can be overwritten in a user configuration file
-(/etc/clfswmrc or $HOME/.clfswmrc). It's a standard lisp file loaded at
-startup. There is an example in the clfswm source (see dot-clfswmrc).
+All variables can be overwritten in a user configuration file:
+$HOME/.clfswmrc or /etc/clfswmrc or $XDG_CONFIG_HOME/clfswm/clfswmrc.
+It's a standard lisp file loaded at startup. There is an example in
+the clfswm source (see dot-clfswmrc).
 
 If you want to add workspaces or groups at startup, tell this to
 clfswm in the init-display function in clfswm.lisp (there is already a
@@ -74,7 +75,7 @@
  [3]Free Software Foundation site.
 
 
-Philippe Brochard <hocwp at free dot fr>.
+Philippe Brochard <pbrochard [at] common-lisp [dot] net>.
 
 Références
 

Modified: clfswm/clfswm-layout.lisp
==============================================================================
--- clfswm/clfswm-layout.lisp	(original)
+++ clfswm/clfswm-layout.lisp	Thu Mar  6 09:47:33 2008
@@ -1,7 +1,7 @@
 ;;; --------------------------------------------------------------------------
 ;;; CLFSWM - FullScreen Window Manager
 ;;;
-;;; #Date#: Wed Feb 27 22:19:57 2008
+;;; #Date#: Thu Mar  6 15:04:13 2008
 ;;;
 ;;; --------------------------------------------------------------------------
 ;;; Documentation: Layout functions
@@ -47,7 +47,7 @@
   (when (group-p *current-child*)
     (setf (group-layout *current-child*) layout)
     (leave-second-mode)))
-    ;;(show-all-childs)))
+
 
 (defun get-managed-child (father)
   "Return only window in normal mode who can be tiled"
@@ -59,6 +59,12 @@
 (defun register-layout (layout)
   (setf *layout-list* (append *layout-list* (list layout))))
 
+(defun layout-ask-size (msg slot &optional (min 80))
+  (when (group-p *current-child*)
+    (let ((new-size (/ (or (query-number msg (* (group-data-slot *current-child* slot) 100)) min) 100)))
+      (when (<= 0 new-size 1)
+	(setf (group-data-slot *current-child* slot) new-size)))))
+
 
 
 ;;; No layout
@@ -112,15 +118,6 @@
 
 
 ;;; Tile Left
-(defun layout-ask-size (msg slot &optional (min 80))
-  (when (group-p *current-child*)
-    (let ((new-size (/ (or (query-number msg) min) 100)))
-      (when (<= 0 new-size 1)
-	(setf (group-data-slot *current-child* slot) new-size)))))
-
-
-
-
 (defgeneric tile-left-layout (child father)
   (:documentation "Tile Left: main child on left and others on right"))
 

Modified: clfswm/clfswm-util.lisp
==============================================================================
--- clfswm/clfswm-util.lisp	(original)
+++ clfswm/clfswm-util.lisp	Thu Mar  6 09:47:33 2008
@@ -1,7 +1,7 @@
 ;;; --------------------------------------------------------------------------
 ;;; CLFSWM - FullScreen Window Manager
 ;;;
-;;; #Date#: Tue Mar  4 22:41:07 2008
+;;; #Date#: Thu Mar  6 15:26:18 2008
 ;;;
 ;;; --------------------------------------------------------------------------
 ;;; Documentation: Utility
@@ -29,7 +29,7 @@
 
 (defun load-contrib (file)
   "Load a file in the contrib directory"
-  (let ((truename (concatenate 'string cl-user:*base-dir* "contrib/" file)))
+  (let ((truename (concatenate 'string *contrib-dir* "contrib/" file)))
     (format t "Loading contribution file: ~A~%" truename)
     (when (probe-file truename)
       (load truename))))

Modified: clfswm/clfswm.lisp
==============================================================================
--- clfswm/clfswm.lisp	(original)
+++ clfswm/clfswm.lisp	Thu Mar  6 09:47:33 2008
@@ -1,7 +1,7 @@
 ;;; --------------------------------------------------------------------------
 ;;; CLFSWM - FullScreen Window Manager
 ;;;
-;;; #Date#: Sat Mar  1 00:02:34 2008
+;;; #Date#: Thu Mar  6 15:34:27 2008
 ;;;
 ;;; --------------------------------------------------------------------------
 ;;; Documentation: Main functions
@@ -261,10 +261,12 @@
 
 
 
-(defun main (&optional (display-str (or (getenv "DISPLAY") ":0")) protocol)
+(defun main (&key (display (or (getenv "DISPLAY") ":0")) protocol
+	     (base-dir (directory-namestring (or *load-truename* ""))))
+  (setf *contrib-dir* base-dir)
   (read-conf-file)
   (handler-case
-      (open-display display-str protocol)
+      (open-display display protocol)
     (xlib:access-error (c)
       (format t "~&~A~&Maybe another window manager is running.~%" c)
       (force-output)

Modified: clfswm/load.lisp
==============================================================================
--- clfswm/load.lisp	(original)
+++ clfswm/load.lisp	Thu Mar  6 09:47:33 2008
@@ -1,7 +1,7 @@
 ;;; --------------------------------------------------------------------------
 ;;; CLFSWM - FullScreen Window Manager
 ;;;
-;;; #Date#: Tue Mar  4 22:29:03 2008
+;;; #Date#: Thu Mar  6 15:38:05 2008
 ;;;
 ;;; --------------------------------------------------------------------------
 ;;; Documentation: System loading functions
@@ -57,4 +57,4 @@
 
 (in-package :clfswm)
 
-(clfswm:main ":0")
+(clfswm:main)

Modified: clfswm/package.lisp
==============================================================================
--- clfswm/package.lisp	(original)
+++ clfswm/package.lisp	Thu Mar  6 09:47:33 2008
@@ -1,7 +1,7 @@
 ;;; --------------------------------------------------------------------------
 ;;; CLFSWM - FullScreen Window Manager
 ;;;
-;;; #Date#: Sat Mar  1 13:52:50 2008
+;;; #Date#: Thu Mar  6 15:25:41 2008
 ;;;
 ;;; --------------------------------------------------------------------------
 ;;; Documentation: Package definition
@@ -41,6 +41,8 @@
 (defparameter *no-focus-window* nil)
 (defparameter *root-gc* nil)
 
+(defparameter *contrib-dir* "")
+
 (defparameter *default-font* nil)
 ;;(defparameter *default-font-string* "9x15")
 (defparameter *default-font-string* "fixed")



More information about the clfswm-cvs mailing list