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 7 and Version 8 of Customize


Ignore:
Timestamp:
02/29/08 23:59:56 (10 years ago)
Author:
pbrochard
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • Customize

    v7 v8  
    11= [wiki:CLFSWM] customization =
    22
     3== Configuration files ==
    34
    45[wiki:CLFSWM] reads its customization informations from one of those files (in this order) at startup:
     
    1011Those files can contain any valid lisp code.
    1112
    12 == __Keybinding customization__ ==
     13== How to configure [wiki:CLFSWM] ==
    1314
    14 Use:
    15 
    16   * '''define-main-key''' to define a new main keybinding (see [http://common-lisp.net/cgi-bin/viewcvs.cgi/*checkout*/clfswm/bindings.lisp?root=clfswm bindings.lisp]).
    17   * '''define-second-key''' to define a new keybinding in the second mode (see [http://common-lisp.net/cgi-bin/viewcvs.cgi/*checkout*/clfswm/bindings-second-mode.lisp?root=clfswm bindings-second-mode.lisp]).
    18   * '''define-mouse-action''' to define a new mouse action in the second mode (see [http://common-lisp.net/cgi-bin/viewcvs.cgi/*checkout*/clfswm/bindings-second-mode.lisp?root=clfswm bindings-second-mode.lisp]).
     15  * [wiki:KeybindingCustomization Keybinding customization]
     16  * [wiki:MenuCustomization Menu customization]
     17  * [wiki:Hooks]
    1918
    2019
    21 == __Menu customization__ ==
    22 
    23 see [http://common-lisp.net/cgi-bin/viewcvs.cgi/*checkout*/clfswm/bindings-second-mode.lisp?root=clfswm bindings-second-mode.lisp] if you want to access to the second mode menu.
    24 
    25 
    26 == __Hooks__ ==
    27 
    28 There is a lots of hooks in CLFSWM. This page can serve to descibe them.
    29 
    30 === __Init hook__ ===
    31 
    32 At startup, just after the creation of the first group, [wiki:CLFSWM] calls the '''*init-hook*'''.
    33 With this hook you can add more groups or configure the '''*root-group*'''.
    34 
    35 Here is my current '''*init-hook*''':
    36 
    37 {{{
    38 (defun my-init-hook ()
    39   (dbg 'my-init-hook)
    40   (let ((group (create-group :name "Default")))
    41     (add-group group *root-group*)
    42     (add-group (create-group :name "Lisp") *root-group*)
    43     (add-group (create-group :name "Test") *root-group*)
    44     (focus-all-childs group *root-group*)))
    45 
    46 (setf *init-hook* #'my-init-hook)
    47 }}}
    48 
    49 Here is a more complex example:
    50 
    51 {{{
    52 (defun my-init-hook ()
    53   (dbg 'my-init-hook)
    54   (let ((group (create-group :name "Default" :layout #'tile-space-layout)))
    55     (add-group group *root-group*)
    56     (setf (group-data-slot group :tile-size) 0.7))
    57   (add-group (create-group :name "The Gimp" :x 0.6 :y 0 :w 0.3 :h 0.2
    58                            :layout #'tile-left-layout)
    59              *root-group*)
    60   (add-group (create-group :name "Net" :x 0.52 :y 0.3 :w 0.4 :h 0.3) *root-group*)
    61   (add-group (create-group :name "The Qiv" :x 0 :y 0.4 :w 0.4 :h 0.2) (first (group-child *root-group*)))
    62   (add-group (create-group :x 0.4 :y 0 :w 0.2 :h 0.3) (first (group-child *root-group*)))
    63   (add-group (create-group :x 0.6 :y 0.4 :w 0.4 :h 0.2) (first (group-child *root-group*)))
    64   (add-group (create-group :x 0.4 :y 0.7 :w 0.2 :h 0.3) (first (group-child *root-group*)))
    65   (add-group (create-group :x 0.1 :y 0.55 :w 0.8 :h 0.43) *root-group*)
    66   (add-group (create-group :x 0.2 :y 0.1 :w 0.6 :h 0.4) (first (group-child *root-group*)))
    67   (add-group (create-group :x 0.3 :y 0.55 :w 0.4 :h 0.3) (first (group-child *root-group*)))
    68   (add-group (create-group :x 0.1 :y 0.1 :w 0.3 :h 0.6)
    69              (first (group-child (first (group-child *root-group*)))))
    70   (setf *current-child* (first (group-child *current-root*)))
    71   (setf (group-layout *current-child*) #'tile-layout))
    72 
    73 (setf *init-hook* #'my-init-hook)
    74 }}}
    75 
    76 
    77 === __New window hook__ ===
    78 
    79 Not already defined...
    80 
    81 
    82 === __Main mode hooks__ ===
    83 
    84 Those hooks are set in [http://common-lisp.net/cgi-bin/viewcvs.cgi/*checkout*/clfswm/clfswm.lisp?root=clfswm clfswm.lisp].
    85 
    86 '''*button-press-hook*''' ;
    87 '''*button-motion-notify-hook*''' ;
    88 '''*key-press-hook*''' ;
    89 '''*configure-request-hook*''' ;
    90 '''*configure-notify-hook*''' ;
    91 '''*create-notify-hook*''' ;
    92 '''*destroy-notify-hook*''' ;
    93 '''*enter-notify-hook*''' ;
    94 '''*exposure-hook*''' ;
    95 '''*map-request-hook*''' ;
    96 '''*mapping-notify-hook*''' ;
    97 '''*property-notify-hook*''' ;
    98 '''*unmap-notify-hook*'''.
    99 
    100 
    101 === __Second mode hooks__ ===
    102 
    103 Those hooks are set in  [http://common-lisp.net/cgi-bin/viewcvs.cgi/*checkout*/clfswm/clfswm-second-mode.lisp?root=clfswm clfswm-second-mode.lisp].
    104 
    105 
    106 '''*sm-button-press-hook*''' ;
    107 '''*sm-button-release-hook*''' ;
    108 '''*sm-motion-notify-hook*''' ;
    109 '''*sm-key-press-hook*''' ;
    110 '''*sm-configure-request-hook*''' ;
    111 '''*sm-configure-notify-hook*''' ;
    112 '''*sm-map-request-hook*''' ;
    113 '''*sm-unmap-notify-hook*''' ;
    114 '''*sm-destroy-notify-hook*''' ;
    115 '''*sm-mapping-notify-hook*''' ;
    116 '''*sm-property-notify-hook*''' ;
    117 '''*sm-create-notify-hook*''' ;
    118 '''*sm-enter-notify-hook*''' ;
    119 '''*sm-exposure-hook*'''.
    120