[clfswm-devel] request pull my bugfix patch

Philippe Brochard pbrochard at common-lisp.net
Tue Feb 1 22:44:12 UTC 2011


Hi,

I've added your run-or-raise function in the clfswm code (commited in
your name) as this can be useful for others. And I've added your
start-emacs/conkeror as examples in the doc/dot-clfswmrc

Thanks!

Philippe



Desmond O. Chang writes:


[...]


> Thank you!  Your code works well!
>
> And I put it into a new function RUN-OR-RAISE.
>
> This is the final version in my conffile, for your reference:
>
>
> (defun run-or-raise (raisep run-fn &key (maximized t))
>   (let ((window (block return-block
>                   (with-all-windows (*root-frame* win)
>                     (when (funcall raisep win)
>                       (return-from return-block win))))))
>     (if window
>         (let ((parent (find-parent-frame window)))
>           (hide-all-children *current-root*)
>           (setf *current-child* parent
>                 (frame-child parent)
>                 (cons window (child-remove window (frame-child parent))))
>           (when maximized
>             (setf *current-root* parent))
>           (show-all-children))
>         (funcall run-fn))))
>
> (defun $start-emacs ()
>   "start emacs"
>   (setf *second-mode-leave-function*
>         (lambda ()
>           (run-or-raise (lambda (win) (string-equal "emacs"
> (xlib:get-wm-class win)))
>                         (lambda () (do-shell "cd $HOME && exec
> emacsclient -c")))))
>   (leave-second-mode))
>
> (defun $start-conkeror ()
>   "start conkeror"
>   (setf *second-mode-leave-function*
>         (lambda ()
>           (run-or-raise (lambda (win) (string-equal "Navigator"
> (xlib:get-wm-class win)))
>                         (lambda () (do-shell "cd $HOME && exec conkeror")))))
>   (leave-second-mode))
>
> _______________________________________________
> clfswm-devel mailing list
> clfswm-devel at common-lisp.net
> http://common-lisp.net/cgi-bin/mailman/listinfo/clfswm-devel




More information about the clfswm-devel mailing list