From pbrochard at common-lisp.net Tue Jan 1 16:32:45 2008 From: pbrochard at common-lisp.net (pbrochard) Date: Tue, 1 Jan 2008 11:32:45 -0500 (EST) Subject: [clfswm-cvs] CVS clfswm Message-ID: <20080101163245.6A0171F012@common-lisp.net> Update of /project/clfswm/cvsroot/clfswm In directory clnet:/tmp/cvs-serv17878 Modified Files: ChangeLog clfswm-internal.lisp clfswm.lisp Log Message: Better configure-request and new window handle request --- /project/clfswm/cvsroot/clfswm/ChangeLog 2007/12/31 16:32:41 1.8 +++ /project/clfswm/cvsroot/clfswm/ChangeLog 2008/01/01 16:32:45 1.9 @@ -1,3 +1,13 @@ +2008-01-01 Philippe Brochard + + * clfswm.lisp (handle-exposure): Redisplay groups on exposure + event but do not clear the root window. + (handle-configure-request): Adjust unmanaged window from there + request. + + * clfswm-internal.lisp (process-new-window): Adjust new window + with the specified hints (max/min/base width/height). + 2007-12-31 Philippe Brochard * clfswm.lisp (handle-configure-request): Send an Configuration --- /project/clfswm/cvsroot/clfswm/clfswm-internal.lisp 2007/12/31 16:49:25 1.10 +++ /project/clfswm/cvsroot/clfswm/clfswm-internal.lisp 2008/01/01 16:32:45 1.11 @@ -1,7 +1,7 @@ ;;; -------------------------------------------------------------------------- ;;; CLFSWM - FullScreen Window Manager ;;; -;;; #Date#: Mon Dec 31 17:46:55 2007 +;;; #Date#: Tue Jan 1 17:30:30 2008 ;;; ;;; -------------------------------------------------------------------------- ;;; Documentation: Main functions @@ -312,16 +312,18 @@ (get-group-size (current-group)) (let* ((hints (xlib:wm-normal-hints window)) (min-width (or (and hints (xlib:wm-size-hints-min-width hints)) 0)) - (min-height (or (and hints (xlib:wm-size-hints-min-height hints)) 0))) - ;;(dbg min-width min-height) - (setf (drawable-width window) (max min-width (drawable-width window)) - (drawable-height window) (max min-height (drawable-height window))) + (min-height (or (and hints (xlib:wm-size-hints-min-height hints)) 0)) + (max-width (or (and hints (xlib:wm-size-hints-max-width hints)) (drawable-width *root*))) + (max-height (or (and hints (xlib:wm-size-hints-max-height hints)) (drawable-height *root*))) + (rwidth (or (and hints (or (xlib:wm-size-hints-width hints) (xlib:wm-size-hints-base-width hints))) + (drawable-width window))) + (rheight (or (and hints (or (xlib:wm-size-hints-height hints) (xlib:wm-size-hints-base-height hints))) + (drawable-height window)))) + (setf (drawable-width window) (min (max min-width rwidth) max-width) + (drawable-height window) (min (max min-height rheight) max-height)) (setf (drawable-x window) (truncate (+ x (/ (- width (drawable-width window)) 2))) (drawable-y window) (truncate (+ y (/ (- height (drawable-height window)) 2)))))))) - ;;(dbg (drawable-x window) (drawable-y window) (drawable-width window) (drawable-height window)) (add-window-in-group window (current-group)) - ;;(dbg (drawable-x window) (drawable-y window) (drawable-width window) (drawable-height window)) - ;;(format t "-------------------------------~%") (netwm-add-in-client-list window)) --- /project/clfswm/cvsroot/clfswm/clfswm.lisp 2007/12/31 16:38:36 1.8 +++ /project/clfswm/cvsroot/clfswm/clfswm.lisp 2008/01/01 16:32:45 1.9 @@ -1,7 +1,7 @@ ;;; -------------------------------------------------------------------------- ;;; CLFSWM - FullScreen Window Manager ;;; -;;; #Date#: Mon Dec 31 17:34:22 2007 +;;; #Date#: Tue Jan 1 17:26:34 2008 ;;; ;;; -------------------------------------------------------------------------- ;;; Documentation: Main functions @@ -87,20 +87,23 @@ (has-w (mask) (= 4 (logand mask 4))) (has-h (mask) (= 8 (logand mask 8))) (has-bw (mask) (= 16 (logand mask 16))) - (has-stackmode (mask) (= 64 (logand mask 64)))) + (has-stackmode (mask) (= 64 (logand mask 64))) + (adjust-from-request () + (when (has-x value-mask) (setf (drawable-x window) x)) + (when (has-y value-mask) (setf (drawable-y window) y)) + (when (has-h value-mask) (setf (drawable-height window) height)) + (when (has-w value-mask) (setf (drawable-width window) width)))) (handler-case (progn (with-state (window) (when (has-bw value-mask) (setf (drawable-border-width window) border-width)) - (when (member window (group-window-list (current-group))) - (case (window-type window) - (:normal (adapt-window-to-group window (current-group))) - (t (when (has-x value-mask) (setf (drawable-x window) x)) - (when (has-y value-mask) (setf (drawable-y window) y)) - (when (has-h value-mask) (setf (drawable-height window) height)) - (when (has-w value-mask) (setf (drawable-width window) width))))) - (send-configuration-notify window) + (if (member window (group-window-list (current-group))) + (case (window-type window) + (:normal (adapt-window-to-group window (current-group)) + (send-configuration-notify window)) + (t (adjust-from-request))) + (adjust-from-request)) (when (has-stackmode value-mask) (case stack-mode (:above (raise-window window)))))) @@ -154,8 +157,8 @@ (focus-group-under-mouse root-x root-y))) (defun handle-exposure (&rest event-slots) - (declare (ignore event-slots))) -;; (show-all-group (current-workspace))) + (declare (ignore event-slots)) + (show-all-group (current-workspace) *root* *root-gc* nil)) (defun handle-create-notify (&rest event-slots) From pbrochard at common-lisp.net Tue Jan 1 19:13:45 2008 From: pbrochard at common-lisp.net (pbrochard) Date: Tue, 1 Jan 2008 14:13:45 -0500 (EST) Subject: [clfswm-cvs] CVS clfswm Message-ID: <20080101191345.2C0A66209F@common-lisp.net> Update of /project/clfswm/cvsroot/clfswm In directory clnet:/tmp/cvs-serv19100 Modified Files: ChangeLog bindings-second-mode.lisp clfswm-second-mode.lisp package.lisp Log Message: Display the action on mouse motion in second mode. --- /project/clfswm/cvsroot/clfswm/ChangeLog 2008/01/01 16:32:45 1.9 +++ /project/clfswm/cvsroot/clfswm/ChangeLog 2008/01/01 19:13:44 1.10 @@ -1,5 +1,8 @@ 2008-01-01 Philippe Brochard + * clfswm-second-mode.lisp (draw-second-mode-window): Display + the action on mouse motion in second mode. + * clfswm.lisp (handle-exposure): Redisplay groups on exposure event but do not clear the root window. (handle-configure-request): Adjust unmanaged window from there --- /project/clfswm/cvsroot/clfswm/bindings-second-mode.lisp 2007/12/31 16:32:41 1.8 +++ /project/clfswm/cvsroot/clfswm/bindings-second-mode.lisp 2008/01/01 19:13:45 1.9 @@ -1,7 +1,7 @@ ;;; -------------------------------------------------------------------------- ;;; CLFSWM - FullScreen Window Manager ;;; -;;; #Date#: Mon Dec 31 00:14:27 2007 +;;; #Date#: Tue Jan 1 19:23:19 2008 ;;; ;;; -------------------------------------------------------------------------- ;;; Documentation: Bindings keys and mouse for second mode @@ -384,13 +384,6 @@ -(defparameter *motion-action* nil) -(defparameter *motion-object* nil) -(defparameter *motion-start-group* nil) -(defparameter *motion-dx* nil) -(defparameter *motion-dy* nil) - - (let ((accept-motion t) (selected-group nil)) @@ -533,7 +526,8 @@ "Move selected window" (xgrab-pointer *root* 50 51) (select-group-under-mouse root-x root-y) - (setf *motion-object* (current-window)) + (setf *motion-object* (current-window) + *motion-action* :move-window) (when *motion-object* (setf *motion-start-group* (current-group)))) @@ -553,7 +547,8 @@ (defun copy-selected-window (root-x root-y) "Copy selected window" - (move-selected-window root-x root-y)) + (move-selected-window root-x root-y) + (setf *motion-action* :copy-window)) (defun release-copy-selected-window (root-x root-y) "Release button" --- /project/clfswm/cvsroot/clfswm/clfswm-second-mode.lisp 2007/12/31 16:38:36 1.8 +++ /project/clfswm/cvsroot/clfswm/clfswm-second-mode.lisp 2008/01/01 19:13:45 1.9 @@ -1,7 +1,7 @@ ;;; -------------------------------------------------------------------------- ;;; CLFSWM - FullScreen Window Manager ;;; -;;; #Date#: Mon Dec 31 17:37:12 2007 +;;; #Date#: Tue Jan 1 20:12:23 2008 ;;; ;;; -------------------------------------------------------------------------- ;;; Documentation: Second mode functions @@ -36,9 +36,10 @@ (defun draw-second-mode-window () (clear-area *sm-window*) - (let* ((text (format nil "Workspace ~A ~:(~A~) ~A ~A" + (let* ((text (format nil "Workspace ~A ~:(~A~) ~A ~A ~A" (workspace-number (current-workspace)) (if *arrow-action* *arrow-action* "") + (if *motion-action* *motion-action* "") (cond ((numberp *open-next-window-in-new-workspace*) (format nil ">W:~A" *open-next-window-in-new-workspace*)) (*open-next-window-in-new-workspace* ">W") --- /project/clfswm/cvsroot/clfswm/package.lisp 2007/12/29 15:20:10 1.8 +++ /project/clfswm/cvsroot/clfswm/package.lisp 2008/01/01 19:13:45 1.9 @@ -1,7 +1,7 @@ ;;; -------------------------------------------------------------------------- ;;; CLFSWM - FullScreen Window Manager ;;; -;;; #Date#: Fri Dec 28 22:32:54 2007 +;;; #Date#: Tue Jan 1 20:11:50 2008 ;;; ;;; -------------------------------------------------------------------------- ;;; Documentation: Package definition @@ -135,6 +135,13 @@ (defparameter *pager-exposure-hook* nil) +;;; Second mode global variables +(defparameter *motion-action* nil) +(defparameter *motion-object* nil) +(defparameter *motion-start-group* nil) +(defparameter *motion-dx* nil) +(defparameter *motion-dy* nil) + ;; For debug - redefine defun ;;(shadow :defun) From pbrochard at common-lisp.net Tue Jan 1 21:24:47 2008 From: pbrochard at common-lisp.net (pbrochard) Date: Tue, 1 Jan 2008 16:24:47 -0500 (EST) Subject: [clfswm-cvs] CVS clfswm Message-ID: <20080101212447.CD33132035@common-lisp.net> Update of /project/clfswm/cvsroot/clfswm In directory clnet:/tmp/cvs-serv19527 Modified Files: ChangeLog clfswm-util.lisp Log Message: Add show parent matching in query string --- /project/clfswm/cvsroot/clfswm/ChangeLog 2008/01/01 19:13:44 1.10 +++ /project/clfswm/cvsroot/clfswm/ChangeLog 2008/01/01 21:24:47 1.11 @@ -1,5 +1,8 @@ 2008-01-01 Philippe Brochard + * clfswm-util.lisp (query-show-paren): Add show parent matching in + query string. + * clfswm-second-mode.lisp (draw-second-mode-window): Display the action on mouse motion in second mode. --- /project/clfswm/cvsroot/clfswm/clfswm-util.lisp 2007/12/30 12:03:36 1.7 +++ /project/clfswm/cvsroot/clfswm/clfswm-util.lisp 2008/01/01 21:24:47 1.8 @@ -1,7 +1,7 @@ ;;; -------------------------------------------------------------------------- ;;; CLFSWM - FullScreen Window Manager ;;; -;;; #Date#: Sun Dec 30 12:59:59 2007 +;;; #Date#: Tue Jan 1 22:22:10 2008 ;;; ;;; -------------------------------------------------------------------------- ;;; Documentation: Utility @@ -476,6 +476,34 @@ +(defun query-show-paren (orig-string pos) + "Replace matching parentheses with brackets" + (let ((string (copy-seq orig-string))) + (labels ((have-to-find-right? () + (and (< pos (length string)) (char= (aref string pos) #\())) + (have-to-find-left? () + (and (> (1- pos) 0) (char= (aref string (1- pos)) #\)))) + (pos-right () + (loop :for p :from (1+ pos) :below (length string) + :with level = 1 :for c = (aref string p) + :do (when (char= c #\() (incf level)) + (when (char= c #\)) (decf level)) + (when (= level 0) (return p)))) + (pos-left () + (loop :for p :from (- pos 2) :downto 0 + :with level = 1 :for c = (aref string p) + :do (when (char= c #\() (decf level)) + (when (char= c #\)) (incf level)) + (when (= level 0) (return p))))) + (when (have-to-find-right?) + (let ((p (pos-right))) + (when p (setf (aref string p) #\])))) + (when (have-to-find-left?) + (let ((p (pos-left))) + (when p (setf (aref string p) #\[)))) + string))) + + ;;; CONFIG - Query string mode (let ((history nil)) (defun clear-history () @@ -503,15 +531,16 @@ (result-string default) (pos (length default)) (local-history history)) - (labels ((print-string () + (labels ((add-cursor (string) + (concatenate 'string (subseq string 0 pos) "|" (subseq string pos))) + (print-string () (clear-area window) (setf (gcontext-foreground gc) (get-color *query-foreground*)) (draw-image-glyphs window gc 5 (+ (max-char-ascent font) 5) msg) (when (< pos 0) (setf pos 0)) (when (> pos (length result-string)) (setf pos (length result-string))) (draw-image-glyphs window gc 10 (+ (* 2 (+ (max-char-ascent font) (max-char-descent font))) 5) - (concatenate 'string (subseq result-string 0 pos) - "|" (subseq result-string pos)))) + (add-cursor (query-show-paren result-string pos)))) (call-backspace (modifiers) (let ((del-pos (if (member :control modifiers) (or (position #\Space result-string :from-end t :end pos) 0) From pbrochard at common-lisp.net Tue Jan 1 21:44:17 2008 From: pbrochard at common-lisp.net (pbrochard) Date: Tue, 1 Jan 2008 16:44:17 -0500 (EST) Subject: [clfswm-cvs] CVS clfswm Message-ID: <20080101214417.18CF84B026@common-lisp.net> Update of /project/clfswm/cvsroot/clfswm In directory clnet:/tmp/cvs-serv23909 Modified Files: ChangeLog clfswm-util.lisp Log Message: Bind control+k to delete end of line in query-string --- /project/clfswm/cvsroot/clfswm/ChangeLog 2008/01/01 21:24:47 1.11 +++ /project/clfswm/cvsroot/clfswm/ChangeLog 2008/01/01 21:44:16 1.12 @@ -2,6 +2,7 @@ * clfswm-util.lisp (query-show-paren): Add show parent matching in query string. + (query-string): Bind control+k to delete end of line. * clfswm-second-mode.lisp (draw-second-mode-window): Display the action on mouse motion in second mode. --- /project/clfswm/cvsroot/clfswm/clfswm-util.lisp 2008/01/01 21:24:47 1.8 +++ /project/clfswm/cvsroot/clfswm/clfswm-util.lisp 2008/01/01 21:44:16 1.9 @@ -1,7 +1,7 @@ ;;; -------------------------------------------------------------------------- ;;; CLFSWM - FullScreen Window Manager ;;; -;;; #Date#: Tue Jan 1 22:22:10 2008 +;;; #Date#: Tue Jan 1 22:39:40 2008 ;;; ;;; -------------------------------------------------------------------------- ;;; Documentation: Utility @@ -558,6 +558,8 @@ (setf result-string (concatenate 'string (subseq result-string 0 pos) (subseq result-string del-pos)))))) + (call-delete-eof () + (setf result-string (subseq result-string 0 pos))) (handle-query-key (&rest event-slots &key root code state &allow-other-keys) (declare (ignore event-slots root)) (let* ((modifiers (make-state-keys state)) @@ -569,15 +571,7 @@ (setf done (cond ((string-equal keysym-name "Return") :Return) ((string-equal keysym-name "Escape") :Escape) (t nil))) - (cond ((and (characterp char) (standard-char-p char)) - (setf result-string (concatenate 'string - (when (<= pos (length result-string)) - (subseq result-string 0 pos)) - (string char) - (when (< pos (length result-string)) - (subseq result-string pos)))) - (incf pos)) - ((string-equal keysym-name "Left") + (cond ((string-equal keysym-name "Left") (when (> pos 0) (setf pos (if (member :control modifiers) (let ((p (position #\Space result-string @@ -603,7 +597,17 @@ ((string-equal keysym-name "Home") (setf pos 0)) ((string-equal keysym-name "End") (setf pos (length result-string))) ((string-equal keysym-name "Backspace") (call-backspace modifiers)) - ((string-equal keysym-name "Delete") (call-delete modifiers))) + ((string-equal keysym-name "Delete") (call-delete modifiers)) + ((and (string-equal keysym-name "k") (member :control modifiers)) + (call-delete-eof)) + ((and (characterp char) (standard-char-p char)) + (setf result-string (concatenate 'string + (when (<= pos (length result-string)) + (subseq result-string 0 pos)) + (string char) + (when (< pos (length result-string)) + (subseq result-string pos)))) + (incf pos))) (print-string))) (handle-query (&rest event-slots &key display event-key &allow-other-keys) (declare (ignore display)) From pbrochard at common-lisp.net Thu Jan 3 20:31:25 2008 From: pbrochard at common-lisp.net (pbrochard) Date: Thu, 3 Jan 2008 15:31:25 -0500 (EST) Subject: [clfswm-cvs] CVS clfswm Message-ID: <20080103203125.653CD4B059@common-lisp.net> Update of /project/clfswm/cvsroot/clfswm In directory clnet:/tmp/cvs-serv17082 Modified Files: ChangeLog README bindings-pager.lisp bindings-second-mode.lisp bindings.lisp clfswm-internal.lisp clfswm-keys.lisp clfswm-second-mode.lisp clfswm-util.lisp clfswm.asd clfswm.lisp config.lisp dot-clfswmrc load.lisp xlib-util.lisp Log Message: Change to make clfswm run with clisp/new-clx. --- /project/clfswm/cvsroot/clfswm/ChangeLog 2008/01/01 21:44:16 1.12 +++ /project/clfswm/cvsroot/clfswm/ChangeLog 2008/01/03 20:31:24 1.13 @@ -1,3 +1,7 @@ +2008-01-03 Philippe Brochard + + * clfswm*: Change to make clfswm run with clisp/new-clx. + 2008-01-01 Philippe Brochard * clfswm-util.lisp (query-show-paren): Add show parent matching in --- /project/clfswm/cvsroot/clfswm/README 2007/12/21 22:38:14 1.2 +++ /project/clfswm/cvsroot/clfswm/README 2008/01/03 20:31:24 1.3 @@ -19,7 +19,7 @@ keys.html -Installation +* Installation Boot up a common lisp implementation. I develop it with sbcl, I've tested it with cmucl and I use it with clisp (you need the clx/xlib @@ -39,10 +39,15 @@ > (clfswm:main) ; start the main loop -Tweaking +* Tweaking 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). + 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 default workspace and a default group created). @@ -50,12 +55,19 @@ In all cases, you can grep the source with 'CONFIG' and 'Alternative' keywords to find where you can simply customize clfswm. -All variables can be overwritten in a user configuration file -(/etc/clfswmrc or ~/.clfswmrc). It's a standard lisp file loaded at -startup. There is an example in the clfswm source (dot-clfswmrc). -License +* Lisp implementation note + +If you are using clisp/new-clx, be sure to use the last version (at +least 2.43). Older versions are a little bit bogus. +If you are using clisp/mit-clx or an other clx than clisp/new-clx, you +may find a speed up with the compress notify event. See the variable +*have-to-compress-notify* in the configuration file. + + + +* License CLFSWM is under the GNU General Public License - GPL license. You can find more information in the files COPYING. or on the --- /project/clfswm/cvsroot/clfswm/bindings-pager.lisp 2007/12/29 15:20:10 1.6 +++ /project/clfswm/cvsroot/clfswm/bindings-pager.lisp 2008/01/03 20:31:24 1.7 @@ -1,7 +1,7 @@ ;;; -------------------------------------------------------------------------- ;;; CLFSWM - FullScreen Window Manager ;;; -;;; #Date#: Sat Dec 29 16:00:58 2007 +;;; #Date#: Thu Jan 3 00:26:05 2008 ;;; ;;; -------------------------------------------------------------------------- ;;; Documentation: Bindings keys and mouse for pager mode @@ -43,7 +43,7 @@ (pager-draw-display))) -(define-pager-key (#\Return) 'leave-pager-mode) +(define-pager-key ("Return") 'leave-pager-mode) (define-pager-key ("Escape") 'leave-pager-mode) (define-pager-key (#\b) 'banish-pointer) --- /project/clfswm/cvsroot/clfswm/bindings-second-mode.lisp 2008/01/01 19:13:45 1.9 +++ /project/clfswm/cvsroot/clfswm/bindings-second-mode.lisp 2008/01/03 20:31:24 1.10 @@ -1,7 +1,7 @@ ;;; -------------------------------------------------------------------------- ;;; CLFSWM - FullScreen Window Manager ;;; -;;; #Date#: Tue Jan 1 19:23:19 2008 +;;; #Date#: Thu Jan 3 00:25:33 2008 ;;; ;;; -------------------------------------------------------------------------- ;;; Documentation: Bindings keys and mouse for second mode @@ -68,12 +68,12 @@ (define-second-key (#\t) 'leave-second-mode-maximize) -(define-second-key (#\Return) 'leave-second-mode-maximize) +(define-second-key ("Return") 'leave-second-mode-maximize) (define-second-key ("Escape") 'leave-second-mode) (define-second-key (#\< :control) 'leave-second-mode) -(define-second-key (#\Return :control) 'leave-second-mode) +(define-second-key ("Return" :control) 'leave-second-mode) ;; Escape (define-second-key ("Escape" :control :shift) 'delete-current-window) @@ -131,8 +131,8 @@ -(define-second-key (#\Tab :mod-1) 'rotate-window-up) -(define-second-key (#\Tab :mod-1 :shift) 'rotate-window-down) +(define-second-key ("Tab" :mod-1) 'rotate-window-up) +(define-second-key ("Tab" :mod-1 :shift) 'rotate-window-down) (define-second-key (#\b) 'banish-pointer) --- /project/clfswm/cvsroot/clfswm/bindings.lisp 2007/12/22 22:55:26 1.5 +++ /project/clfswm/cvsroot/clfswm/bindings.lisp 2008/01/03 20:31:24 1.6 @@ -1,7 +1,7 @@ ;;; -------------------------------------------------------------------------- ;;; CLFSWM - FullScreen Window Manager ;;; -;;; #Date#: Sat Dec 22 23:30:51 2007 +;;; #Date#: Thu Jan 3 19:23:24 2008 ;;; ;;; -------------------------------------------------------------------------- ;;; Documentation: Bindings keys and mouse @@ -44,9 +44,10 @@ (define-main-key ("Home" :mod-1 :control :shift) 'quit-clfswm) (define-main-key (#\t :mod-1) 'second-key-mode) +(define-main-key ("less" :control) 'second-key-mode) -(define-main-key (#\Tab :mod-1) 'rotate-window-up) -(define-main-key (#\Tab :mod-1 :shift) 'rotate-window-down) +(define-main-key ("Tab" :mod-1) 'rotate-window-up) +(define-main-key ("Tab" :mod-1 :shift) 'rotate-window-down) (define-main-key (#\b :mod-1) 'banish-pointer) (define-main-key (#\b :mod-1 :control) 'toggle-maximize-current-group) --- /project/clfswm/cvsroot/clfswm/clfswm-internal.lisp 2008/01/01 16:32:45 1.11 +++ /project/clfswm/cvsroot/clfswm/clfswm-internal.lisp 2008/01/03 20:31:24 1.12 @@ -1,7 +1,7 @@ ;;; -------------------------------------------------------------------------- ;;; CLFSWM - FullScreen Window Manager ;;; -;;; #Date#: Tue Jan 1 17:30:30 2008 +;;; #Date#: Thu Jan 3 00:25:14 2008 ;;; ;;; -------------------------------------------------------------------------- ;;; Documentation: Main functions --- /project/clfswm/cvsroot/clfswm/clfswm-keys.lisp 2007/12/22 22:55:26 1.4 +++ /project/clfswm/cvsroot/clfswm/clfswm-keys.lisp 2008/01/03 20:31:24 1.5 @@ -1,7 +1,7 @@ ;;; -------------------------------------------------------------------------- ;;; CLFSWM - FullScreen Window Manager ;;; -;;; #Date#: Sat Dec 22 22:52:07 2007 +;;; #Date#: Thu Jan 3 19:24:00 2008 ;;; ;;; -------------------------------------------------------------------------- ;;; Documentation: Keys functions definition @@ -119,8 +119,8 @@ (,function *root* keycode :modifiers (second k)) (format t "~&Grabbing error: Can't find key '~A'~%" key))) (error (c) - (declare (ignore c)) - (format t "~&Grabbing error: Can't grab key '~A'~%" k))) + ;;(declare (ignore c)) + (format t "~&Grabbing error: Can't grab key '~A' (~A)~%" k c))) (force-output))) ,hashtable))) --- /project/clfswm/cvsroot/clfswm/clfswm-second-mode.lisp 2008/01/01 19:13:45 1.9 +++ /project/clfswm/cvsroot/clfswm/clfswm-second-mode.lisp 2008/01/03 20:31:24 1.10 @@ -1,7 +1,7 @@ ;;; -------------------------------------------------------------------------- ;;; CLFSWM - FullScreen Window Manager ;;; -;;; #Date#: Tue Jan 1 20:12:23 2008 +;;; #Date#: Thu Jan 3 00:14:39 2008 ;;; ;;; -------------------------------------------------------------------------- ;;; Documentation: Second mode functions @@ -69,8 +69,7 @@ (defun sm-handle-motion-notify (&rest event-slots &key root-x root-y &allow-other-keys) (declare (ignore event-slots)) - (unless (event-case (*display* :discard-p nil :peek-p t :timeout 0) - (:motion-notify () t)) + (unless (compress-motion-notify) (funcall-button-from-code *mouse-action* 'motion 0 root-x root-y #'first))) (defun sm-handle-button-press (&rest event-slots &key root-x root-y code state &allow-other-keys) --- /project/clfswm/cvsroot/clfswm/clfswm-util.lisp 2008/01/01 21:44:16 1.9 +++ /project/clfswm/cvsroot/clfswm/clfswm-util.lisp 2008/01/03 20:31:24 1.10 @@ -1,7 +1,7 @@ ;;; -------------------------------------------------------------------------- ;;; CLFSWM - FullScreen Window Manager ;;; -;;; #Date#: Tue Jan 1 22:39:40 2008 +;;; #Date#: Wed Jan 2 23:45:31 2008 ;;; ;;; -------------------------------------------------------------------------- ;;; Documentation: Utility @@ -618,6 +618,7 @@ (xgrab-pointer *root* 92 93) (map-window window) (print-string) + (wait-no-key-or-button-press) (unwind-protect (loop until (or (eq done :Return) (eq done :Escape)) do (display-finish-output *display*) --- /project/clfswm/cvsroot/clfswm/clfswm.asd 2007/12/29 15:20:10 1.5 +++ /project/clfswm/cvsroot/clfswm/clfswm.asd 2008/01/03 20:31:24 1.6 @@ -2,7 +2,7 @@ ;;;; Author: Philippe Brochard ;;;; ASDF System Definition ;;; -;;; #date#: Sat Dec 29 15:08:01 2007 +;;; #date#: Wed Jan 2 23:30:31 2008 (in-package #:asdf) @@ -18,12 +18,12 @@ :depends-on ("my-html" "tools")) (:file "config" :depends-on ("package")) - (:file "xlib-util" + (:file "keysyms" :depends-on ("package")) + (:file "xlib-util" + :depends-on ("package" "keysyms" "config")) (:file "netwm-util" :depends-on ("package" "xlib-util")) - (:file "keysyms" - :depends-on ("package")) (:file "clfswm-keys" :depends-on ("package" "config" "xlib-util" "keysyms")) (:file "clfswm-internal" --- /project/clfswm/cvsroot/clfswm/clfswm.lisp 2008/01/01 16:32:45 1.9 +++ /project/clfswm/cvsroot/clfswm/clfswm.lisp 2008/01/03 20:31:24 1.10 @@ -1,7 +1,7 @@ ;;; -------------------------------------------------------------------------- ;;; CLFSWM - FullScreen Window Manager ;;; -;;; #Date#: Tue Jan 1 17:26:34 2008 +;;; #Date#: Thu Jan 3 19:24:03 2008 ;;; ;;; -------------------------------------------------------------------------- ;;; Documentation: Main functions --- /project/clfswm/cvsroot/clfswm/config.lisp 2007/12/26 22:49:35 1.6 +++ /project/clfswm/cvsroot/clfswm/config.lisp 2008/01/03 20:31:24 1.7 @@ -1,7 +1,7 @@ ;;; -------------------------------------------------------------------------- ;;; CLFSWM - FullScreen Window Manager ;;; -;;; #Date#: Wed Dec 26 20:22:26 2007 +;;; #Date#: Wed Jan 2 23:40:41 2008 ;;; ;;; -------------------------------------------------------------------------- ;;; Documentation: Configuration file @@ -33,6 +33,13 @@ (in-package :clfswm) +;;; CONFIG - Compress motion notify ? +(defparameter *have-to-compress-notify* nil + "This variable may be useful to speed up some slow version of CLX. +It is particulary useful with CLISP/MIT-CLX.") + + + ;;; CONFIG - Screen size ;;(defparameter *fullscreen* '(0 0 1024 600)) (defparameter *fullscreen* '(0 0 1024 768)) --- /project/clfswm/cvsroot/clfswm/dot-clfswmrc 2007/12/29 15:24:44 1.5 +++ /project/clfswm/cvsroot/clfswm/dot-clfswmrc 2008/01/03 20:31:24 1.6 @@ -7,6 +7,12 @@ (in-package :clfswm) + +;;;; Uncomment the line above if you want to enable the notify event compression. +;;;; This variable may be useful to speed up some slow version of CLX +;;;; It is particulary useful with CLISP/MIT-CLX. +;;(setf *have-to-compress-notify* t) + ;;; Color configuration example ;;; ;;; See in package.lisp for all variables --- /project/clfswm/cvsroot/clfswm/load.lisp 2007/12/21 22:01:14 1.3 +++ /project/clfswm/cvsroot/clfswm/load.lisp 2008/01/03 20:31:24 1.4 @@ -37,6 +37,9 @@ #+SBCL (require :asdf) +#+SBCL +(require :clx) + #-ASDF (load (make-pathname :host (pathname-host *base-dir*) :device (pathname-device *base-dir*) --- /project/clfswm/cvsroot/clfswm/xlib-util.lisp 2007/12/21 22:01:14 1.4 +++ /project/clfswm/cvsroot/clfswm/xlib-util.lisp 2008/01/03 20:31:24 1.5 @@ -1,7 +1,7 @@ ;;; -------------------------------------------------------------------------- ;;; CLFSWM - FullScreen Window Manager ;;; -;;; #Date#: Fri Dec 21 23:00:46 2007 +;;; #Date#: Thu Jan 3 17:50:59 2008 ;;; ;;; -------------------------------------------------------------------------- ;;; Documentation: Utility functions @@ -247,6 +247,45 @@ (alloc-color (screen-default-colormap *screen*) color)) + + + +#+CLISP +(unless (fboundp 'xlib:character->keysyms) + (ext:without-package-lock ("XLIB") + (defun character->keysyms (ch) + "Convert a char to a keysym" + ;; XLIB:CHARACTER->KEYSYMS should probably be implemented in NEW-CLX + ;; some day. Or just copied from MIT-CLX or some other CLX + ;; implementation (see translate.lisp and keysyms.lisp). For now, + ;; we do like this. It suffices for modifiers and ASCII symbols. + (list + (case ch + (:character-set-switch #xFF7E) + (:left-shift #xFFE1) + (:right-shift #xFFE2) + (:left-control #xFFE3) + (:right-control #xFFE4) + (:caps-lock #xFFE5) + (:shift-lock #xFFE6) + (:left-meta #xFFE7) + (:right-meta #xFFE8) + (:left-alt #xFFE9) + (:right-alt #xFFEA) + (:left-super #xFFEB) + (:right-super #xFFEC) + (:left-hyper #xFFED) + (:right-hyper #xFFEE) + (t + (etypecase ch + (character + ;; Latin-1 characters have their own value as keysym + (if (< 31 (char-code ch) 256) + (char-code ch) + (error "Don't know how to get keysym from ~A" ch)))))))))) + + + (defun char->keycode (char) "Convert a character to a keycode" (keysym->keycodes *display* (first (character->keysyms char)))) @@ -278,3 +317,10 @@ (t nil))) (return-from wait-no-key-or-button-press nil))))) + + +(defun compress-motion-notify () + (when *have-to-compress-notify* + (event-case (*display* :discard-p nil :peek-p t :timeout 0) + (:motion-notify () t)))) + From pbrochard at common-lisp.net Thu Jan 3 22:15:48 2008 From: pbrochard at common-lisp.net (pbrochard) Date: Thu, 3 Jan 2008 17:15:48 -0500 (EST) Subject: [clfswm-cvs] CVS clfswm Message-ID: <20080103221548.59978690DA@common-lisp.net> Update of /project/clfswm/cvsroot/clfswm In directory clnet:/tmp/cvs-serv16280 Modified Files: ChangeLog bindings-second-mode.lisp clfswm-internal.lisp clfswm.lisp tools.lisp Log Message: adapt window to its group in all cases --- /project/clfswm/cvsroot/clfswm/ChangeLog 2008/01/03 20:31:24 1.13 +++ /project/clfswm/cvsroot/clfswm/ChangeLog 2008/01/03 22:15:48 1.14 @@ -1,5 +1,7 @@ 2008-01-03 Philippe Brochard + * clfswm-internal.lisp (find-window-group): New function. + * clfswm*: Change to make clfswm run with clisp/new-clx. 2008-01-01 Philippe Brochard --- /project/clfswm/cvsroot/clfswm/bindings-second-mode.lisp 2008/01/03 20:31:24 1.10 +++ /project/clfswm/cvsroot/clfswm/bindings-second-mode.lisp 2008/01/03 22:15:48 1.11 @@ -1,7 +1,7 @@ ;;; -------------------------------------------------------------------------- ;;; CLFSWM - FullScreen Window Manager ;;; -;;; #Date#: Thu Jan 3 00:25:33 2008 +;;; #Date#: Thu Jan 3 23:13:40 2008 ;;; ;;; -------------------------------------------------------------------------- ;;; Documentation: Bindings keys and mouse for second mode @@ -385,6 +385,14 @@ +(defun init-motion-vars () + (setf *motion-action* nil + *motion-object* nil + *motion-start-group* nil + *motion-dx* nil + *motion-dy* nil)) + + (let ((accept-motion t) (selected-group nil)) (defun mouse-motion (root-x root-y) @@ -477,10 +485,7 @@ (move-group-to *motion-object* (+ root-x *motion-dx*) (+ root-y *motion-dy*))) (:resize-group (resize-group *motion-object* 0 0)))) - (setf *motion-action* nil - *motion-object* nil - *motion-dx* nil - *motion-dy* nil) + (init-motion-vars) (select-group-under-mouse root-x root-y)) @@ -491,10 +496,7 @@ (unless (group-windows-already-in-workspace *motion-object* (current-workspace)) (add-group-in-workspace *motion-object* (current-workspace)) (move-group-to *motion-object* (+ root-x *motion-dx*) (+ root-y *motion-dy*)))) - (setf *motion-action* nil - *motion-object* nil - *motion-dx* nil - *motion-dy* nil) + (init-motion-vars) (select-group-under-mouse root-x root-y) (show-all-windows-in-workspace (current-workspace))) @@ -514,10 +516,7 @@ "Release button" (when *motion-object* (resize-group *motion-object* 0 0)) - (setf *motion-action* nil - *motion-object* nil - *motion-dx* nil - *motion-dy* nil) + (init-motion-vars) (select-group-under-mouse root-x root-y)) @@ -535,11 +534,11 @@ (defun release-move-selected-window (root-x root-y) "Release button" (xgrab-pointer *root* 66 67) - (setf *motion-action* nil) (select-group-under-mouse root-x root-y) (when *motion-object* (remove-window-in-group *motion-object* *motion-start-group*) (add-window-in-group *motion-object* (current-group))) + (init-motion-vars) (select-group-under-mouse root-x root-y) (show-all-windows-in-workspace (current-workspace))) @@ -553,11 +552,11 @@ (defun release-copy-selected-window (root-x root-y) "Release button" (xgrab-pointer *root* 66 67) - (setf *motion-action* nil) (select-group-under-mouse root-x root-y) (when *motion-object* (unless (window-already-in-workspace *motion-object* (current-workspace)) (add-window-in-group *motion-object* (current-group)))) + (init-motion-vars) (select-group-under-mouse root-x root-y) (show-all-windows-in-workspace (current-workspace))) --- /project/clfswm/cvsroot/clfswm/clfswm-internal.lisp 2008/01/03 20:31:24 1.12 +++ /project/clfswm/cvsroot/clfswm/clfswm-internal.lisp 2008/01/03 22:15:48 1.13 @@ -1,7 +1,7 @@ ;;; -------------------------------------------------------------------------- ;;; CLFSWM - FullScreen Window Manager ;;; -;;; #Date#: Thu Jan 3 00:25:14 2008 +;;; #Date#: Thu Jan 3 23:09:04 2008 ;;; ;;; -------------------------------------------------------------------------- ;;; Documentation: Main functions @@ -233,6 +233,13 @@ +(defun find-window-group (window workspace) + "Find the group where the window window is" + (dolist (group (workspace-group-list workspace)) + (when (member window (group-window-list group)) + (return-from find-window-group group)))) + + (defun get-all-windows () "Return a list with all known windows in all workspace" (let ((acc nil)) --- /project/clfswm/cvsroot/clfswm/clfswm.lisp 2008/01/03 20:31:24 1.10 +++ /project/clfswm/cvsroot/clfswm/clfswm.lisp 2008/01/03 22:15:48 1.11 @@ -1,7 +1,7 @@ ;;; -------------------------------------------------------------------------- ;;; CLFSWM - FullScreen Window Manager ;;; -;;; #Date#: Thu Jan 3 19:24:03 2008 +;;; #Date#: Thu Jan 3 23:10:41 2008 ;;; ;;; -------------------------------------------------------------------------- ;;; Documentation: Main functions @@ -98,9 +98,9 @@ (with-state (window) (when (has-bw value-mask) (setf (drawable-border-width window) border-width)) - (if (member window (group-window-list (current-group))) + (if (window-already-in-workspace window (current-workspace)) (case (window-type window) - (:normal (adapt-window-to-group window (current-group)) + (:normal (adapt-window-to-group window (find-window-group window (current-workspace))) (send-configuration-notify window)) (t (adjust-from-request))) (adjust-from-request)) @@ -115,7 +115,7 @@ (defun handle-configure-notify (&rest event-slots) (declare (ignore event-slots))) -;; (adapt-all-window-in-workspace (current-workspace))) + --- /project/clfswm/cvsroot/clfswm/tools.lisp 2007/12/29 15:20:10 1.4 +++ /project/clfswm/cvsroot/clfswm/tools.lisp 2008/01/03 22:15:48 1.5 @@ -1,7 +1,7 @@ ;;; -------------------------------------------------------------------------- ;;; CLFSWM - FullScreen Window Manager ;;; -;;; #Date#: Sat Dec 29 15:08:48 2007 +;;; #Date#: Thu Jan 3 22:53:59 2008 ;;; ;;; -------------------------------------------------------------------------- ;;; Documentation: General tools @@ -31,6 +31,7 @@ (defpackage tools (:use common-lisp) (:export :dbg + :dbgnl :setf/= :create-symbol :split-string @@ -106,6 +107,23 @@ (force-output) , at forms)) +(defmacro dbgnl (&rest forms) + `(progn + ,@(mapcar #'(lambda (form) + (typecase form + (string `(setf *%dbg-name%* ,form)) + (number `(setf *%dbg-count%* ,form)))) + forms) + (format t "~&DEBUG[~A - ~A] --------------------~%" (incf *%dbg-count%*) *%dbg-name%*) + ,@(mapcar #'(lambda (form) + (typecase form + ((or string number) nil) + (t `(format t " - ~A=~S~%" ',form ,form)))) + forms) + (force-output) + , at forms)) + + From pbrochard at common-lisp.net Fri Jan 4 22:57:22 2008 From: pbrochard at common-lisp.net (pbrochard) Date: Fri, 4 Jan 2008 17:57:22 -0500 (EST) Subject: [clfswm-cvs] CVS clfswm Message-ID: <20080104225722.B2AF7A149@common-lisp.net> Update of /project/clfswm/cvsroot/clfswm In directory clnet:/tmp/cvs-serv11892/clfswm/clfswm Modified Files: bindings-pager.lisp Log Message: Change in pager documentation --- /project/clfswm/cvsroot/clfswm/bindings-pager.lisp 2008/01/03 20:31:24 1.7 +++ /project/clfswm/cvsroot/clfswm/bindings-pager.lisp 2008/01/04 22:57:22 1.8 @@ -1,7 +1,7 @@ ;;; -------------------------------------------------------------------------- ;;; CLFSWM - FullScreen Window Manager ;;; -;;; #Date#: Thu Jan 3 00:26:05 2008 +;;; #Date#: Fri Jan 4 23:56:09 2008 ;;; ;;; -------------------------------------------------------------------------- ;;; Documentation: Bindings keys and mouse for pager mode @@ -146,7 +146,7 @@ (define-pager-key ("Up") (defun b-pager-move-or-pack-up () - "Move, pack, fill or resize group up" + "Move cursor, pack, fill or resize group up" (let ((action *pager-arrow-action*)) (setf *pager-arrow-action* nil) (case action @@ -159,7 +159,7 @@ (define-pager-key ("Down") (defun b-pager-move-or-pack-down () - "Move, pack, fill or resize group down" + "Move cursor, pack, fill or resize group down" (let ((action *pager-arrow-action*)) (setf *pager-arrow-action* nil) (case action @@ -172,7 +172,7 @@ (define-pager-key ("Right") (defun b-pager-move-or-pack-right () - "Move, pack, fill or resize group right" + "Move cursor, pack, fill or resize group right" (let ((action *pager-arrow-action*)) (setf *pager-arrow-action* nil) (case action @@ -185,7 +185,7 @@ (define-pager-key ("Left") (defun b-pager-move-or-pack-left () - "Move, pack, fill or resize group left" + "Move cursor, pack, fill or resize group left" (let ((action *pager-arrow-action*)) (setf *pager-arrow-action* nil) (case action From pbrochard at common-lisp.net Sat Jan 5 00:15:11 2008 From: pbrochard at common-lisp.net (pbrochard) Date: Fri, 4 Jan 2008 19:15:11 -0500 (EST) Subject: [clfswm-cvs] CVS clfswm Message-ID: <20080105001511.EDDDB46183@common-lisp.net> Update of /project/clfswm/cvsroot/clfswm In directory clnet:/tmp/cvs-serv3808 Modified Files: keys.html keys.txt Log Message: documentation update --- /project/clfswm/cvsroot/clfswm/keys.html 2007/12/29 15:24:44 1.3 +++ /project/clfswm/cvsroot/clfswm/keys.html 2008/01/05 00:15:11 1.4 @@ -32,24 +32,24 @@ - Control + Mod-1 - < + 0 - Switch to editing mode + Focus workspace 10 - + Mod-1 - Twosuperior + 9 - Move the pointer to the lower right corner of the screen + Focus workspace 9 @@ -57,10 +57,10 @@ Mod-1 - Twosuperior + 8 - Maximize/minimize the current group + Focus workspace 8 @@ -68,10 +68,10 @@ Mod-1 - Ampersand + 7 - Focus workspace 1 + Focus workspace 7 @@ -79,10 +79,10 @@ Mod-1 - Eacute + 6 - Focus workspace 2 + Focus workspace 6 @@ -90,10 +90,10 @@ Mod-1 - Quotedbl + 5 - Focus workspace 3 + Focus workspace 5 @@ -101,7 +101,7 @@ Mod-1 - Quoteright + 4 Focus workspace 4 @@ -112,10 +112,10 @@ Mod-1 - Parenleft + 3 - Focus workspace 5 + Focus workspace 3 @@ -123,10 +123,10 @@ Mod-1 - Minus + 2 - Focus workspace 6 + Focus workspace 2 @@ -134,10 +134,10 @@ Mod-1 - Egrave + 1 - Focus workspace 7 + Focus workspace 1 @@ -318,13 +318,13 @@ - Mod-1 + Mod-1 Control - Underscore + B - Focus workspace 8 + Maximize/minimize the current group @@ -332,10 +332,10 @@ Mod-1 - Ccedilla + B - Focus workspace 9 + Move the pointer to the lower right corner of the screen and redraw all groups @@ -343,7 +343,7 @@ Mod-1 Shift - Tab + Tab Rotate down windows in the current group @@ -354,7 +354,7 @@ Mod-1 - Tab + Tab Rotate up windows in the current group @@ -362,13 +362,24 @@ + Control + + + Less + + + Switch to editing mode + + + + Mod-1 - Agrave + T - Focus workspace 10 + Switch to editing mode @@ -416,39 +427,6 @@ Shift - T - - - Tile the current workspace horizontally - - - - - - - - T - - - Tile the current workspace vertically - - - - - - - - - - - Run Apwal - - - - - Shift - - Left @@ -897,13 +875,13 @@ - Mod-1 Control + Mod-1 - Eacute + B - Sort workspaces by numbers + Maximize/minimize the current group @@ -911,10 +889,10 @@ - Twosuperior + B - Move the pointer to the lower right corner of the screen + Move the pointer to the lower right corner of the screen and redraw all groups @@ -922,7 +900,7 @@ Mod-1 Shift - Tab + Tab Rotate down windows in the current group @@ -933,7 +911,7 @@ Mod-1 - Tab + Tab Rotate up windows in the current group @@ -941,24 +919,24 @@ - + Mod-1 Control - < + 2 - Leave second mode and maximize current group + Sort workspaces by numbers - Mod-1 + Mod-1 Control - Ampersand + 1 - Focus workspace 1 + Reset workspaces numbers (1 for current workspace, 2 for the second...) @@ -966,10 +944,10 @@ Mod-1 - Eacute + 0 - Focus workspace 2 + Focus workspace 10 @@ -977,10 +955,10 @@ Mod-1 - Quotedbl + 9 - Focus workspace 3 + Focus workspace 9 @@ -988,10 +966,10 @@ Mod-1 - Quoteright + 8 - Focus workspace 4 + Focus workspace 8 @@ -999,10 +977,10 @@ Mod-1 - Parenleft + 7 - Focus workspace 5 + Focus workspace 7 @@ -1010,7 +988,7 @@ Mod-1 - Minus + 6 Focus workspace 6 @@ -1021,10 +999,10 @@ Mod-1 - Egrave + 5 - Focus workspace 7 + Focus workspace 5 [309 lines skipped] --- /project/clfswm/cvsroot/clfswm/keys.txt 2007/12/29 15:24:44 1.3 +++ /project/clfswm/cvsroot/clfswm/keys.txt 2008/01/05 00:15:11 1.4 @@ -6,16 +6,16 @@ Main mode keys: -------------- -Control < Switch to editing mode - Twosuperior Move the pointer to the lower right corner of the screen -Mod-1 Twosuperior Maximize/minimize the current group -Mod-1 Ampersand Focus workspace 1 -Mod-1 Eacute Focus workspace 2 -Mod-1 Quotedbl Focus workspace 3 -Mod-1 Quoteright Focus workspace 4 -Mod-1 Parenleft Focus workspace 5 -Mod-1 Minus Focus workspace 6 -Mod-1 Egrave Focus workspace 7 +Mod-1 0 Focus workspace 10 +Mod-1 9 Focus workspace 9 +Mod-1 8 Focus workspace 8 +Mod-1 7 Focus workspace 7 +Mod-1 6 Focus workspace 6 +Mod-1 5 Focus workspace 5 +Mod-1 4 Focus workspace 4 +Mod-1 3 Focus workspace 3 +Mod-1 2 Focus workspace 2 +Mod-1 1 Focus workspace 1 Mod-1 Control Shift Left Circulate down in workspace copying current group in the next workspace Mod-1 Shift Left Circulate down in workspace moving current group in the next workspace Mod-1 Left Circulate down in workspace @@ -32,11 +32,12 @@ Control Escape Remove the current window in the current group Mod-1 Control Shift Escape Destroy the current window in all groups and workspaces Control Shift Escape Delete the current window in all groups and workspaces -Mod-1 Underscore Focus workspace 8 -Mod-1 Ccedilla Focus workspace 9 +Mod-1 Control B Maximize/minimize the current group +Mod-1 B Move the pointer to the lower right corner of the screen and redraw all groups Mod-1 Shift Tab Rotate down windows in the current group Mod-1 Tab Rotate up windows in the current group -Mod-1 Agrave Focus workspace 10 +Control Less Switch to editing mode +Mod-1 T Switch to editing mode Mod-1 Control Shift Home Quit clfswm Mod-1 F1 Open the help and info window @@ -44,9 +45,6 @@ Second mode keys: ---------------- -Shift T Tile the current workspace horizontally - T Tile the current workspace vertically - Run Apwal Shift Left Resize group left Shift Right Resize group right Shift Down Resize group down @@ -88,22 +86,22 @@ K Remove the current window in the current group Mod-1 K Destroy the current window in all groups and workspaces X Open the fullscreen pager -Mod-1 Control Eacute Sort workspaces by numbers - Twosuperior Move the pointer to the lower right corner of the screen +Mod-1 B Maximize/minimize the current group + B Move the pointer to the lower right corner of the screen and redraw all groups Mod-1 Shift Tab Rotate down windows in the current group Mod-1 Tab Rotate up windows in the current group - < Leave second mode and maximize current group -Mod-1 Ampersand Focus workspace 1 -Mod-1 Eacute Focus workspace 2 -Mod-1 Quotedbl Focus workspace 3 -Mod-1 Quoteright Focus workspace 4 -Mod-1 Parenleft Focus workspace 5 -Mod-1 Minus Focus workspace 6 -Mod-1 Egrave Focus workspace 7 -Mod-1 Underscore Focus workspace 8 -Mod-1 Ccedilla Focus workspace 9 -Mod-1 Agrave Focus workspace 10 -Mod-1 Control Ampersand Reset workspaces numbers (1 for current workspace, 2 for the second...) +Mod-1 Control 2 Sort workspaces by numbers +Mod-1 Control 1 Reset workspaces numbers (1 for current workspace, 2 for the second...) +Mod-1 0 Focus workspace 10 +Mod-1 9 Focus workspace 9 +Mod-1 8 Focus workspace 8 +Mod-1 7 Focus workspace 7 +Mod-1 6 Focus workspace 6 +Mod-1 5 Focus workspace 5 +Mod-1 4 Focus workspace 4 +Mod-1 3 Focus workspace 3 +Mod-1 2 Focus workspace 2 +Mod-1 1 Focus workspace 1 Mod-1 Control Shift Left Circulate down in workspace copying current group in the next workspace Mod-1 Shift Left Circulate down in workspace moving current group in the next workspace Mod-1 Left Circulate down in workspace @@ -124,7 +122,7 @@ Control < Leave second mode Escape Leave second mode Return Leave second mode and maximize current group -Mod-1 Twosuperior Maximize/minimize the current group + T Leave second mode and maximize current group ! Run a program from the query input : Eval a lisp form from the query input I Identify a key @@ -154,18 +152,18 @@ Pager mode keys: --------------- - Twosuperior Move the pointer to the lower right corner of the screen -Mod-1 Ampersand Focus workspace 1 -Mod-1 Eacute Focus workspace 2 -Mod-1 Quotedbl Focus workspace 3 -Mod-1 Quoteright Focus workspace 4 -Mod-1 Parenleft Focus workspace 5 -Mod-1 Minus Focus workspace 6 -Mod-1 Egrave Focus workspace 7 -Mod-1 Underscore Focus workspace 8 -Mod-1 Ccedilla Focus workspace 9 -Mod-1 Agrave Focus workspace 10 -Mod-1 Control Ampersand Reset workspaces numbers (1 for current workspace, 2 for the second...) +Mod-1 Control 2 Sort workspaces by numbers +Mod-1 Control 1 Reset workspaces numbers (1 for current workspace, 2 for the second...) +Mod-1 0 Focus workspace 10 +Mod-1 9 Focus workspace 9 +Mod-1 8 Focus workspace 8 +Mod-1 7 Focus workspace 7 +Mod-1 6 Focus workspace 6 +Mod-1 5 Focus workspace 5 +Mod-1 4 Focus workspace 4 +Mod-1 3 Focus workspace 3 +Mod-1 2 Focus workspace 2 +Mod-1 1 Focus workspace 1 Control Shift Right Copy the current group to the next workspace Control Shift Left Copy the current group to the previous workspace Shift Up Move the current window to the previous line @@ -181,10 +179,10 @@ Mod-1 Down Move group down Mod-1 Up Move group up M Center the current group - Left Move, pack, fill or resize group left - Right Move, pack, fill or resize group right - Down Move, pack, fill or resize group down - Up Move, pack, fill or resize group up + Left Move cursor, pack, fill or resize group left + Right Move cursor, pack, fill or resize group right + Down Move cursor, pack, fill or resize group down + Up Move cursor, pack, fill or resize group up Mod-1 L Resize down the current group L Resize down the current group to its minimal size Control F Fill group horizontally @@ -215,7 +213,7 @@ Mod-1 Tab Rotate up windows in the current group End Select the last workspace Home Select the first workspace -Mod-1 Control Eacute Sort workspaces by numbers + B Move the pointer to the lower right corner of the screen and redraw all groups Escape Leave the pager mode Return Leave the pager mode Control G Stop all pending actions (actions like open in new workspace/group) From pbrochard at common-lisp.net Sat Jan 5 14:25:29 2008 From: pbrochard at common-lisp.net (pbrochard) Date: Sat, 5 Jan 2008 09:25:29 -0500 (EST) Subject: [clfswm-cvs] CVS clfswm Message-ID: <20080105142529.807444B057@common-lisp.net> Update of /project/clfswm/cvsroot/clfswm In directory clnet:/tmp/cvs-serv9056 Modified Files: clfswm.lisp dot-clfswmrc Log Message: better configuration error handler/new dot-clfswmrc example --- /project/clfswm/cvsroot/clfswm/clfswm.lisp 2008/01/03 22:15:48 1.11 +++ /project/clfswm/cvsroot/clfswm/clfswm.lisp 2008/01/05 14:25:29 1.12 @@ -1,7 +1,7 @@ ;;; -------------------------------------------------------------------------- ;;; CLFSWM - FullScreen Window Manager ;;; -;;; #Date#: Thu Jan 3 23:10:41 2008 +;;; #Date#: Sat Jan 5 15:16:21 2008 ;;; ;;; -------------------------------------------------------------------------- ;;; Documentation: Main functions @@ -297,7 +297,9 @@ (conf (or user-conf etc-conf))) (if conf (handler-case (load conf) - (error (c) (values nil (format nil "~s" c) conf)) + (error (c) + (format t "~2%*** Error loading configurtion file: ~A ***~&~A~%" conf c) + (values nil (format nil "~s" c) conf)) (:no-error (&rest args) (declare (ignore args)) (values t nil conf))) (values t nil nil)))) --- /project/clfswm/cvsroot/clfswm/dot-clfswmrc 2008/01/03 20:31:24 1.6 +++ /project/clfswm/cvsroot/clfswm/dot-clfswmrc 2008/01/05 14:25:29 1.7 @@ -11,16 +11,31 @@ ;;;; Uncomment the line above if you want to enable the notify event compression. ;;;; This variable may be useful to speed up some slow version of CLX ;;;; It is particulary useful with CLISP/MIT-CLX. -;;(setf *have-to-compress-notify* t) +;; (setf *have-to-compress-notify* t) + ;;; Color configuration example ;;; ;;; See in package.lisp for all variables -;;(setf *color-unselected* "Blue") +(setf *color-unselected* "Blue") + + +;;(defparameter *fullscreen* '(0 4 800 570)) +(defparameter *fullscreen* '(0 0 1024 750)) + + + +;;; Binding example: Undefine Control-F1 and define Control-F5 as a +;;; new binding in main mode +;;; +;;; See bindings.lisp, bindings-second-mode.lisp and bindings-pager.lisp +;;; for all default bindings definitions. +(undefine-main-key ("F1" :mod-1)) +(define-main-key ("F5" :mod-1) 'help-on-clfswm) -(defparameter *fullscreen* '(0 4 800 592)) +;;; Binding example for apwal (define-second-key (#\Space) (defun tpm-apwal () "Run Apwal" @@ -30,31 +45,23 @@ -;;; Binding example: Undefine Control-F1 and define Control-F5 as a -;;; new binding in main mode -;;; -;;; See bindings.lisp, bindings-second-mode.lisp and bindings-pager.lisp -;;; for all default bindings definitions. -;;(undefine-main-key ("F1" :mod-1)) -;;(define-main-key ("F5" :mod-1) 'help-on-clfswm) - ;;;; Reloading example -;;(defun reload-clfswm () -;; "Reload clfswm" -;; (format t "RELOADING... ") -;; (ungrab-main-keys) -;; (setf *main-keys* (make-hash-table :test 'equal)) -;; (asdf:oos 'asdf:load-op :clfswm) -;; (grab-main-keys) -;; (format t "Done!~%")) -;; -;; -;;(define-main-key ("F2" :mod-1) 'reload-clfswm) +(defun reload-clfswm () + "Reload clfswm" + (format t "RELOADING... ") + (ungrab-main-keys) + (setf *main-keys* (make-hash-table :test 'equal)) + (asdf:oos 'asdf:load-op :clfswm) + (grab-main-keys) + (format t "Done!~%")) + -;;(define-main-key ("F3" :mod-1) (lambda () -;; (do-shell "rxvt"))) +(define-main-key ("F2" :mod-1) 'reload-clfswm) + +(define-main-key ("F3" :mod-1) (lambda () + (do-shell "rxvt"))) @@ -62,36 +69,79 @@ ;;; ;;; See in package.lisp and clfswm.lisp, clfswm-second-mode.lisp ;;; or clfswm-pager.lisp for hook examples -;;(setf *key-press-hook* (list (lambda (&rest args) ; function 1 -;; (format t "Keyp press (before): ~A~%" args) -;; (force-output)) -;; #'handle-key-press ; function 2 (default) -;; (lambda (&rest args) ; function 3 -;; (declare (ignore args)) -;; (format t "Keyp press (after)~%") -;; (force-output)))) - -;;(defun key-string (code state) -;; (let* ((modifiers (make-state-keys state)) -;; (keysym (keysym->keysym-name (keycode->keysym *display* code 0)))) -;; (format nil "~:(~{~A+~}~A~)" modifiers keysym))) -;; -;;(defun display-key-osd (&rest event-slots &key code state &allow-other-keys) -;; (do-shell "pkill osd_cat") -;; (do-shell (format nil "echo ~A | osd_cat -p bottom -f -*-fixed-*-*-*-*-24-*-*-*-*-*-*-1" -;; (key-string code state))) -;; (force-output)) -;; -;;(defun display-key-pager (&rest event-slots &key code state &allow-other-keys) -;; (setf (gcontext-background *pager-gc*) (get-color "Black")) -;; (setf (gcontext-foreground *pager-gc*) (get-color "Red")) -;; (draw-image-glyphs *pager-window* *pager-gc* 400 600 -;; (format nil "~A" (key-string code state))) -;; (display-finish-output *display*)) -;; -;;(setf *key-press-hook* (list #'display-key-osd #'handle-key-press)) -;;(setf *sm-key-press-hook* (list #'display-key-osd #'sm-handle-key-press)) -;;(setf *pager-key-press-hook* (list #'pager-handle-key-press #'display-key-pager)) +(setf *key-press-hook* (list (lambda (&rest args) ; function 1 + (format t "Keyp press (before): ~A~%" args) + (force-output)) + #'handle-key-press ; function 2 (default) + (lambda (&rest args) ; function 3 + (declare (ignore args)) + (format t "Keyp press (after)~%") + (force-output)))) + + + +;;; A more complex example I use to record my desktop and show +;;; documentation associated to each key press. +(defun documentation-key-from-code (hash-key code state) + (labels ((doc-from (key) + (multiple-value-bind (function foundp) + (gethash (list key state) hash-key) + (when (and foundp (first function)) + (documentation (first function) 'function)))) + (from-code () + (doc-from code)) + (from-char () + (let ((char (keycode->char code state))) + (doc-from char))) + (from-string () + (let ((string (keysym->keysym-name (keycode->keysym *display* code 0)))) + (doc-from string)))) + (cond ((from-code)) + ((from-char)) + ((from-string))))) + + +(defun key-string (hash-key code state) + (let* ((modifiers (make-state-keys state)) + (keysym (keysym->keysym-name (keycode->keysym *display* code 0))) + (doc (documentation-key-from-code hash-key code state))) + (values (format nil "~:(~{~A+~}~A~) : ~S" modifiers keysym doc) + doc))) + +(defun display-doc (hash-key code state) + (multiple-value-bind (str doc) + (key-string hash-key code state) + (when doc + (do-shell "pkill osd_cat") + (do-shell (format nil "echo ~A | osd_cat -d 3 -p bottom -o -45 -f -*-fixed-*-*-*-*-12-*-*-*-*-*-*-1" str)) + (force-output)))) + +(defun display-key-osd-main (&rest event-slots &key code state &allow-other-keys) + (display-doc *main-keys* code state)) + +(defun display-key-osd-second (&rest event-slots &key code state &allow-other-keys) + (display-doc *second-keys* code state)) + +(defun display-key-pager (&rest event-slots &key code state &allow-other-keys) + (setf (gcontext-background *pager-gc*) (get-color "Black")) + (setf (gcontext-foreground *pager-gc*) (get-color "Red")) + (multiple-value-bind (str doc) + (key-string *pager-keys* code state) + (when doc + (draw-image-glyphs *pager-window* *pager-gc* 20 570 + (format nil "~A " str))) + (display-finish-output *display*))) + +;; Define new hook or add to precedent one +(if (consp *key-press-hook*) + (push #'display-key-osd-main *key-press-hook*) + (setf *key-press-hook* (list #'display-key-osd-main #'handle-key-press))) +(setf *sm-key-press-hook* (list #'display-key-osd-second #'sm-handle-key-press)) +(setf *pager-key-press-hook* (list #'pager-handle-key-press #'display-key-pager)) + +;;; -- Doc example end -- + + ;;;; Uncomment the lines below if you want to enable the larswm, ;;;; dwm, wmii... cycling style. @@ -100,29 +150,31 @@ ;;;; on the other side. It can be configured in the rc file or interactively ;;;; with the function 'reconfigure-tile-workspace'. ;;;; -;;(defun circulate-group-up () -;; "Circulate up in group - larswm, dwm, wmii style" -;; (banish-pointer) -;; (minimize-group (current-group)) -;; (no-focus) -;; (setf (workspace-group-list (current-workspace)) -;; (rotate-list (workspace-group-list (current-workspace)))) -;; (funcall *tile-workspace-function* (current-workspace)) -;; (show-all-windows-in-workspace (current-workspace))) -;; -;;(defun circulate-group-down () -;; "Circulate down in group - larswm, dwm, wmii style" -;; (banish-pointer) -;; (minimize-group (current-group)) -;; (no-focus) -;; (setf (workspace-group-list (current-workspace)) -;; (anti-rotate-list (workspace-group-list (current-workspace)))) -;; (funcall *tile-workspace-function* (current-workspace)) -;; (show-all-windows-in-workspace (current-workspace))) +(defun circulate-group-up () + "Circulate up in group - larswm, dwm, wmii style" + (banish-pointer) + (minimize-group (current-group)) + (no-focus) + (setf (workspace-group-list (current-workspace)) + (rotate-list (workspace-group-list (current-workspace)))) + (funcall *tile-workspace-function* (current-workspace)) + (show-all-windows-in-workspace (current-workspace))) + +(defun circulate-group-down () + "Circulate down in group - larswm, dwm, wmii style" + (banish-pointer) + (minimize-group (current-group)) + (no-focus) + (setf (workspace-group-list (current-workspace)) + (anti-rotate-list (workspace-group-list (current-workspace)))) + (funcall *tile-workspace-function* (current-workspace)) + (show-all-windows-in-workspace (current-workspace))) + +;;; -- Lasrwm style end -- -;;;; Azerty keyboard configuration (first remove keys, then rebind) +;;; Azerty keyboard configuration (first remove keys, then rebind) ;; Main mode ;;(undefine-main-key (#\t :mod-1)) ;;(undefine-main-key (#\b :mod-1)) @@ -214,5 +266,7 @@ (define-pager-key ("ampersand" :control :mod-1) 'pager-renumber-workspaces) (define-pager-key ("eacute" :control :mod-1) 'pager-sort-workspaces) +;;; -- Azerty configuration end -- + From pbrochard at common-lisp.net Mon Jan 7 20:08:54 2008 From: pbrochard at common-lisp.net (pbrochard) Date: Mon, 7 Jan 2008 15:08:54 -0500 (EST) Subject: [clfswm-cvs] CVS clfswm Message-ID: <20080107200854.EEEFB481A3@common-lisp.net> Update of /project/clfswm/cvsroot/clfswm In directory clnet:/tmp/cvs-serv20649 Modified Files: dot-clfswmrc Log Message: dot-clfswmrc typo --- /project/clfswm/cvsroot/clfswm/dot-clfswmrc 2008/01/05 14:25:29 1.7 +++ /project/clfswm/cvsroot/clfswm/dot-clfswmrc 2008/01/07 20:08:54 1.8 @@ -146,7 +146,7 @@ ;;;; Uncomment the lines below if you want to enable the larswm, ;;;; dwm, wmii... cycling style. ;;;; -;;;; This leave the main window in on side of the screen and tile others +;;;; This leave the main window in one side of the screen and tile others ;;;; on the other side. It can be configured in the rc file or interactively ;;;; with the function 'reconfigure-tile-workspace'. ;;;; From Feed at common-lisp.net Thu Jan 17 15:24:25 2008 From: Feed at common-lisp.net (Feed at common-lisp.net) Date: 17 Jan 2008 07:24:25 -0800 Subject: [clfswm-cvs] Receive hundreds of targeted hits to your website every day from the links in the feeds! Message-ID: <20080117072425.56EC793B2A4DC8AA@from.header.has.no.domain> An HTML attachment was scrubbed... URL: -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- An embedded and charset-unspecified text was scrubbed... Name: Unsubscribe email.txt URL: From Instant at common-lisp.net Sat Jan 19 09:19:03 2008 From: Instant at common-lisp.net (Instant at common-lisp.net) Date: 19 Jan 2008 01:19:03 -0800 Subject: [clfswm-cvs] Can you afford to lose 300, 000 potential customers per year ? Message-ID: <20080119011903.C48A40E5EFFD3997@from.header.has.no.domain> An HTML attachment was scrubbed... URL: -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- An embedded and charset-unspecified text was scrubbed... Name: Unsubscribe email.txt URL: From Instant at common-lisp.net Sat Jan 19 15:17:22 2008 From: Instant at common-lisp.net (Instant at common-lisp.net) Date: 19 Jan 2008 07:17:22 -0800 Subject: [clfswm-cvs] Can you afford to lose 300, 000 potential customers per year ? Message-ID: <20080119071722.85E9F0722AC4CA70@from.header.has.no.domain> An HTML attachment was scrubbed... URL: -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- An embedded and charset-unspecified text was scrubbed... Name: Unsubscribe email.txt URL: From pbrochard at common-lisp.net Sat Jan 19 20:49:29 2008 From: pbrochard at common-lisp.net (Philippe Brochard) Date: Sat, 19 Jan 2008 21:49:29 +0100 Subject: [clfswm-cvs] Sorry for the spam Message-ID: <87abn1sfqe.fsf@free.fr> I've changed the mailing list setings to avoid this. Sorry, Philippe -- Philippe Brochard http://hocwp.free.fr