Documentation and dot-clfswmrc update
[clfswm.git] / doc / dot-clfswmrc
blob20e91fc6b446a2a2e16f3dfb0b08270b6734931b
1 ;;; -*- lisp -*-
2 ;;;
3 ;;; CLFSWM configuration file example
4 ;;;
5 ;;; Send me your configuration file at pbrochard _at_ common-lisp -dot- net
6 ;;; if you want to share it with others.
8 (in-package :clfswm)
12 ;;;; Uncomment the line above if you need default modifiers (or not)
13 ;;(with-capslock)
14 ;;(with-numlock)
15 ;;(without-capslock)
16 ;;(without-numlock)
18 ;;;; Uncomment the line above if you want to enable the notify event compression.
19 ;;;; This variable may be useful to speed up some slow version of CLX
20 ;;;; It is particulary useful with CLISP/MIT-CLX.
21 ;; (setf *have-to-compress-notify* t)
26 ;;; Color configuration example
27 ;;;
28 ;;; See in package.lisp or config.lisp for all variables
29 ;;(setf *color-unselected* "Blue")
32 ;;; How to change the default fullscreen size
33 ;;(defun get-fullscreen-size ()
34 ;;  "Return the size of root child (values rx ry rw rh)
35 ;;You can tweak this to what you want"
36 ;;  (values -2 -2 (+ (xlib:screen-width *screen*) 2) (- (xlib:screen-height *screen*) 20)))
39 ;;; Contributed code example
40 ;;; See in the clfswm/contrib directory to find some contributed code
41 ;;; and se load-contrib to load them. For example:
42 ;;(load-contrib "contrib-example.lisp")
44 ;;(load-contrib "mpd.lisp")
45 ;;(load-contrib "keyb_fr.lisp")
46 ;;(load-contrib "xmms.lisp")
47 ;;(load-contrib "cd-player.lisp")
48 ;;(load-contrib "reboot-halt.lisp")
52 ;;; Binding example: Undefine Control-F1 and define  Control-F5 as a
53 ;;; new binding in main mode
54 ;;;
55 ;;; See bindings.lisp, bindings-second-mode.lisp and bindings-pager.lisp
56 ;;; for all default bindings definitions.
57 ;;(defun binding-example ()
58 ;;  (undefine-main-key ("F1" :mod-1))
59 ;;  (define-main-key ("F5" :mod-1) 'help-on-clfswm)
60 ;;  ;; Binding example for apwal
61 ;;  (define-second-key (#\Space)
62 ;;      (defun tpm-apwal ()
63 ;;      "Run Apwal"
64 ;;      (do-shell "exec apwal")
65 ;;      (show-all-windows-in-workspace (current-workspace))
66 ;;      (throw 'exit-second-loop nil))))
68 ;;(add-hook *binding-hook* 'binding-example)
71 ;;; Set up an UZBL frame where all uzbl windows will be absorbed.
72 ;;;
73 ;;(defun set-uzbl-frame-nw-hook (&optional (frame *current-child*))
74 ;;  "Open the window in the UZBL frame if it match uzbl absorb-nw-test"
75 ;;  (when (frame-p frame)
76 ;;    (setf (frame-nw-hook frame) 'absorb-window-nw-hook
77 ;;        (frame-data-slot frame :nw-absorb-test)  (nw-absorb-test-class "uzbl-core"))))
79 ;;#-:uzbl-menu-added
80 ;;(add-menu-key 'frame-nw-hook-menu "z" 'set-uzbl-frame-nw-hook)
82 ;;(pushnew :uzbl-menu-added *features*)
85 ;;(defun init-uzbl-frame ()
86 ;;  (let ((frame (first (frame-child *root-frame*))))
87 ;;    (setf (frame-data-slot frame :tile-size) 0.7)
88 ;;    (setf *current-root* frame
89 ;;        *current-child* frame)
90 ;;    (bind-on-slot 0)
91 ;;    (let ((uzbl-frame (create-frame :name "Uzbl" :x 0.01 :y 0.01 :w 0.98 :h 0.98)))
92 ;;      (add-frame uzbl-frame frame)
93 ;;      (set-uzbl-frame-nw-hook uzbl-frame))))
95 ;;(unless (member 'init-uzbl-frame *init-hook*)
96 ;;  (add-hook *init-hook* 'init-uzbl-frame))
97 ;;; End UZBL setup.
100 ;;; A more complex example I use to record my desktop and show
101 ;;; documentation associated to each key press.
102 ;;;See contrib/osd.lisp
103 ;;(load-contrib "osd.lisp")
104 ;;;;; -- Doc example end --
108 ;;;;; Init hook examples:
109 ;;(defun my-init-hook-1 ()
110 ;;  (dbg 'my-init-hook)
111 ;;  ;;(add-frame (create-frame :name "Default" :layout #'tile-left-layout :data (list '(:tile-size 0.6))) *root-frame*)
112 ;;  (add-frame (create-frame :name "The Gimp" :x 0.6 :y 0 :w 0.3 :h 0.2) *root-frame*)
113 ;;  (add-frame (create-frame :name "Net" :x 0.52 :y 0.3 :w 0.4 :h 0.3) *root-frame*)
114 ;;  (add-frame (create-frame :x 0.4 :y 0 :w 0.2 :h 0.3) (first (frame-child *root-frame*)))
115 ;;  (add-frame (create-frame :x 0.6 :y 0.4 :w 0.4 :h 0.2) (first (frame-child *root-frame*)))
116 ;;  (add-frame (create-frame :x 0.4 :y 0.7 :w 0.2 :h 0.3) (first (frame-child *root-frame*)))
117 ;;  (let ((frame (create-frame :name "The Qiv" :x 0 :y 0.4 :w 0.4 :h 0.2)))
118 ;;    (add-frame frame (first (frame-child *root-frame*)))
119 ;;    (add-frame (create-frame) frame))
120 ;;  (add-frame (create-frame :x 0.1 :y 0.55 :w 0.8 :h 0.43) *root-frame*)
121 ;;  (add-frame (create-frame :x 0.2 :y 0.1 :w 0.6 :h 0.4) (first (frame-child *root-frame*)))
122 ;;  (add-frame (create-frame :x 0.3 :y 0.55 :w 0.4 :h 0.3) (first (frame-child *root-frame*)))
123 ;;  (add-frame (create-frame :x 0.1 :y 0.1 :w 0.3 :h 0.6) (first (frame-child (first (frame-child *root-frame*)))))
124 ;;  (setf *current-child* (first (frame-child *current-root*)))
125 ;;  (setf (frame-layout *current-child*) #'tile-layout))
127 ;;(defun my-init-hook-2 ()
128 ;;  (dbg 'my-init-hook)
129 ;;  (add-frame (create-frame :name "Default" :layout #'tile-left-layout :data (list '(:tile-size 0.6))) *root-frame*)
130 ;;  (setf *current-child* (first (frame-child *current-root*)))
131 ;;  (setf (frame-layout *current-child*) #'tile-layout))
134 ;;(defun my-init-hook-3 ()
135 ;;  (dbg 'my-init-hook)
136 ;;  (add-frame (create-frame :name "plop" :x 0.1 :y 0.4 :w 0.7 :h 0.3) *root-frame*)
137 ;;  (add-frame (create-frame :name "Default" :layout nil :x 0.1 :y 0.5 :w 0.8 :h 0.5)
138 ;;           *root-frame*)
139 ;;  (setf *current-child* (first (frame-child *current-root*)))
140 ;;  (setf (frame-layout *root-frame*) nil))
144 ;;(defun my-init-hook-4 ()
145 ;;  (let ((frame (add-frame (create-frame :name "Default"
146 ;;                                        :layout #'tile-left-layout
147 ;;                                      :x 0.05 :y 0.05 :w 0.9 :h 0.9)
148 ;;                        *root-frame*)))
149 ;;    (setf *current-child* frame)))
152 ;;;;; Use this hook and prevent yourself to create a new frame to emulate
153 ;;;;; the MS Windows desktop style :)
154 ;;(defun my-init-hook-ms-windows-style ()
155 ;;  (setf (frame-managed-type *root-frame*) nil))
158 ;;;;; Here is another example useful with the ROX filer: Only the
159 ;;;;; root frame fullscreen with some space on the left for icons.
160 ;;(defun my-init-hook-rox-filer ()
161 ;;  (setf (frame-layout *root-frame*) #'tile-left-space-layout
162 ;;      (frame-data-slot *root-frame* :tile-size) 0.9))
167 ;;(setf *init-hook* '(my-init-hook-4))  ;; <- choose one in 1 to 4,
168 ;;;;                                             my-init-hook-ms-windows-style
169 ;;;;                                             my-init-hook-rox-filer
170 ;;;;(setf *init-hook* nil)
171 ;;;;; Init hook end