stumpwm-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[STUMP] [PATCH] More scriptable frame splitting.


From: Michael Raskin
Subject: [STUMP] [PATCH] More scriptable frame splitting.
Date: Sun, 06 Sep 2009 21:53:40 +0400
User-agent: Thunderbird 2.0.0.21 (X11/20090812)

I noticed that saving/restoring layouts doesn't work that nice when
count of monitors is not a constant. The following patch makes writing
scripts to split frames in correct order a bit simpler. That way I get
frame numbers of new frames as I create them (which is convenient).

--- tile-group.lisp     5d5c45df1af2201dc2607a43d48fd4390737e483
+++ tile-group.lisp     b4854fb0863db690a58fad873cb189c12d55c6fc
@@ -725,7 +725,9 @@ depending on the tree's split direction.
                        (sync-frame-windows group leaf))))))

 (defun split-frame (group how &optional (ratio 1/2))
-  "split the current frame into 2 frames. return T if it succeeded. NIL
otherwise."
+  "split the current frame into 2 frames. return new frame number
+  if it succeeded. NIL otherwise. Note: this function used to return
+  T on success"
   (check-type how (member :row :column))
   (let* ((frame (tile-group-current-frame group))
          (head (frame-head group frame)))
@@ -760,7 +762,7 @@ depending on the tree's split direction.
         ;; we also need to show the new window in the other frame
         (when (frame-window f2)
           (unhide-window (frame-window f2)))
-        t))))
+        (frame-number f2)))))

 (defun draw-frame-outline (group f tl br)
   "Draw an outline around FRAME."




reply via email to

[Prev in Thread] Current Thread [Next in Thread]