[clfswm-cvs] r54 - in clfswm: . src
pbrochard at common-lisp.net
pbrochard at common-lisp.net
Sat Mar 22 22:57:05 UTC 2008
Author: pbrochard
Date: Sat Mar 22 17:57:04 2008
New Revision: 54
Modified:
clfswm/ChangeLog
clfswm/clfswm.asd
clfswm/src/bindings-second-mode.lisp
clfswm/src/clfswm-pack.lisp
Log:
explode-group/explode-current-group: new functions.
Modified: clfswm/ChangeLog
==============================================================================
--- clfswm/ChangeLog (original)
+++ clfswm/ChangeLog Sat Mar 22 17:57:04 2008
@@ -1,3 +1,7 @@
+2008-03-22 Philippe Brochard <hocwp at free.fr>
+
+ * src/clfswm-pack.lisp (explode-group/explode-current-group): new functions.
+
2008-03-21 Philippe Brochard <hocwp at free.fr>
* src/clfswm-pack.lisp: Pack, Fill, Resize functions.
Modified: clfswm/clfswm.asd
==============================================================================
--- clfswm/clfswm.asd (original)
+++ clfswm/clfswm.asd Sat Mar 22 17:57:04 2008
@@ -45,7 +45,7 @@
(:file "clfswm-layout"
:depends-on ("package" "clfswm-util" "clfswm-info"))
(:file "clfswm-pack"
- :depends-on ("clfswm" "clfswm-util"))
+ :depends-on ("clfswm" "clfswm-util" "clfswm-second-mode"))
(:file "clfswm-nw-hooks"
:depends-on ("package" "clfswm-util" "clfswm-info"))
(:file "bindings"
Modified: clfswm/src/bindings-second-mode.lisp
==============================================================================
--- clfswm/src/bindings-second-mode.lisp (original)
+++ clfswm/src/bindings-second-mode.lisp Sat Mar 22 17:57:04 2008
@@ -227,7 +227,8 @@
(#\m group-movement-menu)
(#\r rename-current-child)
(#\u renumber-current-group)
- (#\i group-info-menu))))
+ (#\i group-info-menu)
+ (#\x explode-current-group))))
(defun window-menu ()
"Window menu"
Modified: clfswm/src/clfswm-pack.lisp
==============================================================================
--- clfswm/src/clfswm-pack.lisp (original)
+++ clfswm/src/clfswm-pack.lisp Sat Mar 22 17:57:04 2008
@@ -193,31 +193,18 @@
;;;;;,-----
;;;;;| Explode/Implode functions
;;;;;`-----
-;;(defun explode-group (workspace group)
-;; "Create a new group for each window in group"
-;; (dolist (w (rest (group-window-list group)))
-;; (add-group-in-workspace (copy-group *default-group*) workspace)
-;; (add-window-in-group w (first (workspace-group-list workspace)))
-;; (remove-window-in-group w group)))
-;;
-;;(defun implode-group (workspace)
-;; "Move all windows in workspace to one group and remove other groups"
-;; (dolist (g (rest (workspace-group-list workspace)))
-;; (dolist (w (group-window-list g))
-;; (add-window-in-group w (first (workspace-group-list workspace)))
-;; (remove-window-in-group w g))
-;; (remove-group-in-workspace g workspace)))
-;;
-;;
-;;
-;;(defun explode-current-group ()
-;; "Create a new group for each window in the current group"
-;; (explode-group (current-workspace) (current-group))
-;; (show-all-windows-in-workspace (current-workspace)))
-;;
-;;
-;;(defun implode-current-group ()
-;; "Move all windows in the current workspace to one group and remove other groups"
-;; (implode-group (current-workspace))
-;; (show-all-windows-in-workspace (current-workspace)))
+(defun explode-group (group)
+ "Create a new group for each window in group"
+ (when (group-p group)
+ (let ((windows (loop :for child :in (group-child group)
+ :when (xlib:window-p child)
+ :collect child)))
+ (dolist (win windows)
+ (add-group (create-group :child (list win)) group)
+ (remove-child-in-group win group)))))
+
+(defun explode-current-group ()
+ "Create a new group for each window in group"
+ (explode-group *current-child*)
+ (leave-second-mode))
More information about the clfswm-cvs
mailing list