close Warning: Can't synchronize with repository "(default)" (/project/clfswm/public_html/git/clfswm.git does not appear to be a Git repository.). Look in the Trac log for more information.

Changes between Version 1 and Version 2 of Customize


Ignore:
Timestamp:
02/29/08 23:00:39 (10 years ago)
Author:
anonymous
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • Customize

    v1 v2  
    11= [wiki:CLFSWM] customization =
    22
    3 There is a lot of hooks in CLFSWM. This page can serve to descibe them.
     3There is a lots of hooks in CLFSWM. This page can serve to descibe them.
     4
     5== Init hook ==
     6
     7At startup, just after the creation of the first group, [wiki:CLFSWM] calls the '''*init-hook*'''.
     8With this hook you can add more groups or configure the '''*root-group*'''.
     9
     10Here is my current '''*init-hook*''':
     11
     12{{{
     13(defun my-init-hook ()
     14  (dbg 'my-init-hook)
     15  (let ((group (create-group :name "Default")))
     16    (add-group group *root-group*)
     17    (add-group (create-group :name "Lisp") *root-group*)
     18    (add-group (create-group :name "Test") *root-group*)
     19    (focus-all-childs group *root-group*)))
     20
     21(setf *init-hook* #'my-init-hook)
     22}}}
     23
     24Here is a more complex example:
     25
     26{{{
     27(defun my-init-hook ()
     28  (dbg 'my-init-hook)
     29  (let ((group (create-group :name "Default" :layout #'tile-space-layout)))
     30    (add-group group *root-group*)
     31    (setf (group-data-slot group :tile-size) 0.7)
     32    (setf *current-child* group))
     33  (add-group (create-group :name "The Gimp" :x 0.6 :y 0 :w 0.3 :h 0.2
     34                           :layout #'tile-left-layout)
     35             *root-group*)
     36  (add-group (create-group :name "Net" :x 0.52 :y 0.3 :w 0.4 :h 0.3) *root-group*)
     37  (add-group (create-group :name "The Qiv" :x 0 :y 0.4 :w 0.4 :h 0.2) (first (group-child *root-group*)))
     38  (add-group (create-group :x 0.4 :y 0 :w 0.2 :h 0.3) (first (group-child *root-group*)))
     39  (add-group (create-group :x 0.6 :y 0.4 :w 0.4 :h 0.2) (first (group-child *root-group*)))
     40  (add-group (create-group :x 0.4 :y 0.7 :w 0.2 :h 0.3) (first (group-child *root-group*)))
     41  (add-group (create-group :x 0.1 :y 0.55 :w 0.8 :h 0.43) *root-group*)
     42  (add-group (create-group :x 0.2 :y 0.1 :w 0.6 :h 0.4) (first (group-child *root-group*)))
     43  (add-group (create-group :x 0.3 :y 0.55 :w 0.4 :h 0.3) (first (group-child *root-group*)))
     44  (add-group (create-group :x 0.1 :y 0.1 :w 0.3 :h 0.6)
     45             (first (group-child (first (group-child *root-group*)))))
     46  (setf *current-child* (first (group-child *current-root*)))
     47  (setf (group-layout *current-child*) #'tile-layout))
     48
     49(setf *init-hook* #'my-init-hook)
     50}}}