Version 7 (modified by anonymous, 6 years ago)


CLFSWM customization

CLFSWM reads its customization informations from one of those files (in this order) at startup:

  • $HOME/.clfswmrc
  • /etc/clfswmrc
  • $XDG_CONFIG_HOME/clfswm/clfswmrc. By default: $HOME/.config/clfswm/clfswmrc.

CLFSWM reads the first one it founds. Those files can contain any valid lisp code.

Keybinding customization


see  bindings-second-mode.lisp if you want to access to the second mode menu.


There is a lots of hooks in CLFSWM. This page can serve to descibe them.

Init hook

At startup, just after the creation of the first group, CLFSWM calls the *init-hook*. With this hook you can add more groups or configure the *root-group*.

Here is my current *init-hook*:

(defun my-init-hook ()
  (dbg 'my-init-hook)
  (let ((group (create-group :name "Default")))
    (add-group group *root-group*)
    (add-group (create-group :name "Lisp") *root-group*)
    (add-group (create-group :name "Test") *root-group*)
    (focus-all-childs group *root-group*)))

(setf *init-hook* #'my-init-hook)

Here is a more complex example:

(defun my-init-hook ()
  (dbg 'my-init-hook)
  (let ((group (create-group :name "Default" :layout #'tile-space-layout)))
    (add-group group *root-group*)
    (setf (group-data-slot group :tile-size) 0.7))
  (add-group (create-group :name "The Gimp" :x 0.6 :y 0 :w 0.3 :h 0.2
                           :layout #'tile-left-layout)
  (add-group (create-group :name "Net" :x 0.52 :y 0.3 :w 0.4 :h 0.3) *root-group*)
  (add-group (create-group :name "The Qiv" :x 0 :y 0.4 :w 0.4 :h 0.2) (first (group-child *root-group*)))
  (add-group (create-group :x 0.4 :y 0 :w 0.2 :h 0.3) (first (group-child *root-group*)))
  (add-group (create-group :x 0.6 :y 0.4 :w 0.4 :h 0.2) (first (group-child *root-group*)))
  (add-group (create-group :x 0.4 :y 0.7 :w 0.2 :h 0.3) (first (group-child *root-group*)))
  (add-group (create-group :x 0.1 :y 0.55 :w 0.8 :h 0.43) *root-group*)
  (add-group (create-group :x 0.2 :y 0.1 :w 0.6 :h 0.4) (first (group-child *root-group*)))
  (add-group (create-group :x 0.3 :y 0.55 :w 0.4 :h 0.3) (first (group-child *root-group*)))
  (add-group (create-group :x 0.1 :y 0.1 :w 0.3 :h 0.6) 
             (first (group-child (first (group-child *root-group*)))))
  (setf *current-child* (first (group-child *current-root*)))
  (setf (group-layout *current-child*) #'tile-layout))

(setf *init-hook* #'my-init-hook)

New window hook

Not already defined...

Main mode hooks

Those hooks are set in  clfswm.lisp.

*button-press-hook* ; *button-motion-notify-hook* ; *key-press-hook* ; *configure-request-hook* ; *configure-notify-hook* ; *create-notify-hook* ; *destroy-notify-hook* ; *enter-notify-hook* ; *exposure-hook* ; *map-request-hook* ; *mapping-notify-hook* ; *property-notify-hook* ; *unmap-notify-hook*.

Second mode hooks

Those hooks are set in  clfswm-second-mode.lisp.

*sm-button-press-hook* ; *sm-button-release-hook* ; *sm-motion-notify-hook* ; *sm-key-press-hook* ; *sm-configure-request-hook* ; *sm-configure-notify-hook* ; *sm-map-request-hook* ; *sm-unmap-notify-hook* ; *sm-destroy-notify-hook* ; *sm-mapping-notify-hook* ; *sm-property-notify-hook* ; *sm-create-notify-hook* ; *sm-enter-notify-hook* ; *sm-exposure-hook*.