[clfswm-cvs] [clfswm-git]CLFSWM - A(nother) Common Lisp FullScreen Window Manager branch master updated. R-1212-20-g88db02b

Philippe Brochard pbrochard at common-lisp.net
Fri Apr 5 19:39:35 UTC 2013


This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "CLFSWM - A(nother) Common Lisp FullScreen Window Manager".

The branch, master has been updated
       via  88db02bdbaaf6107864c82cf3df3bf95bcd0ec0d (commit)
      from  d6b1dd9193b247f52b6815d39653a2ea729f5477 (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
commit 88db02bdbaaf6107864c82cf3df3bf95bcd0ec0d
Author: Renaud Casenave-Péré <renaud at casenave-pere.fr>
Date:   Fri Apr 5 21:38:51 2013 +0200

    Add a three columns layout

diff --git a/src/clfswm-layout.lisp b/src/clfswm-layout.lisp
index 710bbc0..ef1ce73 100644
--- a/src/clfswm-layout.lisp
+++ b/src/clfswm-layout.lisp
@@ -428,13 +428,49 @@
 
 
 
+
+
+(defun three-columns-layout (child parent)
+  "Three Colums: main child in the middle, others on the two sides."
+  (with-slots (rx ry rw rh) parent
+    (let* ((managed-children (update-layout-managed-children child parent))
+           (pos (child-position child managed-children))
+           (len (max (1- (length managed-children)) 1))
+           (dy (round (/ rh (max (truncate (/ (+ (if (oddp pos) 1 0) len) 2)) 1))))
+           (size (or (frame-data-slot parent :tile-size) 0.75))
+           (other-size (if (> len 1) (/ (- 1 size) 2) (- 1 size))))
+      (if (> (length managed-children) 1)
+          (if (= pos 0)
+              (values (adj-border-xy (if (> len 1)
+                                         (round (+ rx (* rw other-size)))
+                                         rx) parent)
+                      (adj-border-xy ry parent)
+                      (adj-border-wh (round (* rw size)) child)
+                      (adj-border-wh rh child))
+              (values (adj-border-xy (if (oddp pos)
+                                         (round (+ rx (* rw (if (> len 1) (+ size other-size) size))))
+                                         rx) parent)
+                      (adj-border-xy (round (+ ry (* dy (truncate (/ (1- pos) 2))))) parent)
+                      (adj-border-wh (round (* rw other-size)) parent)
+                      (adj-border-wh dy parent)))
+          (no-layout child parent)))))
+
+(defun set-three-columns-layout ()
+  "Three Columns: main child in the middle, others on the two sides."
+  (layout-ask-size "Tile size in percent (%)" :tile-size)
+  (set-layout-managed-children)
+  (set-layout #'three-columns-layout))
+
+
+
 (register-layout-sub-menu 'frame-tile-layout-menu "Frame tile layout menu"
 			  '(("v" set-tile-layout)
 			    ("h" set-tile-horizontal-layout)
                             ("m" set-tile-layout-mix)
 			    ("c" set-one-column-layout)
 			    ("l" set-one-line-layout)
-			    ("s" set-tile-space-layout)))
+			    ("s" set-tile-space-layout)
+                            ("t" set-three-columns-layout)))
 
 
 

-----------------------------------------------------------------------

Summary of changes:
 src/clfswm-layout.lisp |   38 +++++++++++++++++++++++++++++++++++++-
 1 files changed, 37 insertions(+), 1 deletions(-)


hooks/post-receive
-- 
CLFSWM - A(nother) Common Lisp FullScreen Window Manager





More information about the clfswm-cvs mailing list