[clfswm-cvs] r425 - in clfswm: . src
Philippe Brochard
pbrochard at common-lisp.net
Tue Mar 8 21:34:48 UTC 2011
Author: pbrochard
Date: Tue Mar 8 16:34:47 2011
New Revision: 425
Log:
src/clfswm-configuration.lisp (save-variables-in-conf-file): Save only variables with a different value than there original value.
Modified:
clfswm/ChangeLog
clfswm/src/clfswm-configuration.lisp
clfswm/src/clfswm-corner.lisp
clfswm/src/config.lisp
clfswm/src/xlib-util.lisp
Modified: clfswm/ChangeLog
==============================================================================
--- clfswm/ChangeLog (original)
+++ clfswm/ChangeLog Tue Mar 8 16:34:47 2011
@@ -1,3 +1,9 @@
+2011-03-08 Philippe Brochard <pbrochard at common-lisp.net>
+
+ * src/clfswm-configuration.lisp (save-variables-in-conf-file):
+ Save only variables with a different value than there original
+ value.
+
2011-03-07 Philippe Brochard <pbrochard at common-lisp.net>
* src/clfswm-info.lisp (show-config-variable): Use the new
Modified: clfswm/src/clfswm-configuration.lisp
==============================================================================
--- clfswm/src/clfswm-configuration.lisp (original)
+++ clfswm/src/clfswm-configuration.lisp Tue Mar 8 16:34:47 2011
@@ -98,11 +98,13 @@
(format stream "(in-package :clfswm)~2%")
(format stream "(setf~%")
(dolist (group all-groups)
- (format stream " ;; ~A:~%" group)
+ (format stream " ;; ~A:~%" (config-group->string group))
(dolist (var all-variables)
- (when (string-equal (second var) group)
- (format stream " ~A ~A~%" (first var)
- (escape-conf-symbol-value (first var)))))
+ (unless (equal (escape-conf-symbol-value (first var))
+ (escape-conf-value (config-default-value (first var))))
+ (when (string-equal (second var) group)
+ (format stream " ~A ~A~%" (first var)
+ (escape-conf-symbol-value (first var))))))
(format stream "~%"))
(format stream ")~%")
(format stream ";;; ### End of internal variables definitions ### ;;;~%")))
Modified: clfswm/src/clfswm-corner.lisp
==============================================================================
--- clfswm/src/clfswm-corner.lisp (original)
+++ clfswm/src/clfswm-corner.lisp Tue Mar 8 16:34:47 2011
@@ -119,9 +119,9 @@
(let (win)
- (defun equal-clfswm-terminal-id (window)
+ (defun equal-clfswm-terminal (window)
(when win
- (equal (xlib:window-id window) (xlib:window-id win))))
+ (xlib:window-equal window win)))
(defun close-clfswm-terminal ()
(when win
(xlib:destroy-window win)
Modified: clfswm/src/config.lisp
==============================================================================
--- clfswm/src/config.lisp (original)
+++ clfswm/src/config.lisp Tue Mar 8 16:34:47 2011
@@ -38,12 +38,14 @@
+(defun-equal-wm-class equal-wm-class-rox-pinboard "ROX-Pinboard")
+(defun-equal-wm-class equal-wm-class-xvkbd "xvkbd")
;;; CONFIG - Never managed window list
(defconfig *never-managed-window-list*
- (list (list (equal-wm-class-fun "ROX-Pinboard") nil)
- (list (equal-wm-class-fun "xvkbd") 'raise-window)
- (list 'equal-clfswm-terminal-id 'raise-and-focus-window))
+ (list (list 'equal-wm-class-rox-pinboard nil)
+ (list 'equal-wm-class-xvkbd 'raise-window)
+ (list 'equal-clfswm-terminal 'raise-and-focus-window))
nil "CLFSWM will never manage windows of this type.
A list of (list match-function handle-function)")
Modified: clfswm/src/xlib-util.lisp
==============================================================================
--- clfswm/src/xlib-util.lisp (original)
+++ clfswm/src/xlib-util.lisp Tue Mar 8 16:34:47 2011
@@ -812,12 +812,12 @@
return t))
;;; Windows wm class and name tests
-(defun equal-wm-class-fun (class)
- (lambda (win)
- (when (xlib:window-p win)
- (string-equal (xlib:get-wm-class win) class))))
+(defmacro defun-equal-wm-class (symbol class)
+ `(defun ,symbol (window)
+ (when (xlib:window-p window)
+ (string-equal (xlib:get-wm-class window) ,class))))
-(defun equal-wm-name-fun (name)
- (lambda (win)
- (when (xlib:window-p win)
- (string-equal (xlib:wm-name win) name))))
+(defmacro defun-equal-wm-name (symbol name)
+ `(defun ,symbol (window)
+ (when (xlib:window-p window)
+ (string-equal (xlib:wm-name window) ,name))))
More information about the clfswm-cvs
mailing list