[clfswm-devel] Some news: new Exposé mode, new toolbar system.

Philippe Brochard pbrochard at common-lisp.net
Thu Aug 16 21:19:00 UTC 2012


Hi CLFSWM followers,

Here are some news of CLFSWM development as I plan to release a new
clfswm version soon.

1) The Exposé mode is again available. Here are some screenshots:

  http://common-lisp.net/project/clfswm/expose-mode-2.png
  http://common-lisp.net/project/clfswm/expose-mode.png

  And indeed, it works over all your root screens.


2) The toolbar framework in /contrib is done. I've beginning to write
  some modules. Here is a screenshot:

  http://common-lisp.net/project/clfswm/toolbar.png

  This is for test, but for the story, as this is not seen on the
  picture, the upper toolbar appear on edge motion contact. The lower
  one (my actual toolbar) appear on button press.

  For the record, I paste here the add-toolbar documentation to create a
  new toolbar in your configuration file:

  --------------------------------------------------
  add-toolbar (root-x root-y direction size placement modules
                      &key (autohide *toolbar-default-autohide*)
                      (thickness *toolbar-default-thickness*)
                      (refresh-delay *toolbar-default-refresh-delay*)
                      (border-size *toolbar-default-border-size*))
    "Add a new toolbar.
       root-x, root-y: root coordinates or if root-y is nil, root-x is the nth root in root-list.
       direction: one of :horiz or :vert
       placement: same argument as with-placement macro
       modules: list of modules: a list of module name, position in percent and arguments.
                0%=left/up   <->   100%=right/down.
                Example: '((clock 1) (label 50 \"My label\") (clickable-clock 90))
       size: toolbar size in percent of root size
       thickness: toolbar height for horizontal toolbar or width for vertical one
       autohide: one of nil, :click, or :motion
       refresh-delay: refresh delay for toolbar in seconds
       border-size: toolbar window border size"

 Here are some examples:
    (load-contrib "toolbar.lisp")

  ;; Add an horizontal toolbar on root at coordinates 0,0 pixels
  ;; with default modules

    (add-toolbar 0 0 :horiz 80 'top-middle-root-placement *default-toolbar*)


  ;; Add an horizontal toolbar on root at coordinates 0,0 pixels

    (add-toolbar 0 0 :horiz 90 'top-middle-root-placement
                 '((clock 1) (label 50 "Plop") (clock-second 25) (clickable-clock 99))
                 :autohide :click
                 :refresh-delay 1)


  ;; Add an horizontal toolbar on root at coordinates 0,0 pixels

    (add-toolbar 0 0 :horiz 70 'bottom-middle-root-placement '((clock 1) (label 50 "Paf) (clock 99))
                 :autohide :motion)


  ;; Add a vertical toolbar on root 0

    (add-toolbar 0 nil :vert 60 'middle-left-root-placement '((clock 1) (label 50 "My label") (clock 90)))


  ;; Add a vertical toolbar on root 1

    (add-toolbar 1 nil :vert 70 'bottom-right-root-placement '((clock 1) (label 50) (clickable-clock 99)))
  --------------------------------------------------


Now, I need your help if you want some particular modules on your
toolbar.
I plan to write one for mpd and sound volume, one for navigating in
clfswm (enter frame, leave frame...). But any other idea or code is very
welcome!!!

If you want to write a new toolbar module, you just have to define what
to do when it must be displayed. And, if needed, what to do when you
click on it. 
This is done with the two macros define-toolbar-module and
define-toolbar-module-click.

Here is an example. But see contrib/toolbar.lisp for more details (at
the end of the file):

(define-toolbar-module (module-name module-arg1 module-arg2...)
  "...Module documentation..."
  (action to do on display))

(define-toolbar-module-click (module-name module-arg1 module-arg2...)
  "...Module documentation on click..."
  (action to do on click))



Please test intensively and share any idea or code.
I plan to release a new CLFSWM version on the next week I think.

Best regards,

Have fun,

Philippe




More information about the clfswm-devel mailing list