Add a configuration variable (steal-focus) to allow or not to steal the focus on...
[clfswm.git] / src / config.lisp
blob19e305897184a30a263777093560479b18b7158e
1 ;;; --------------------------------------------------------------------------
2 ;;; CLFSWM - FullScreen Window Manager
3 ;;;
4 ;;; --------------------------------------------------------------------------
5 ;;; Documentation: Configuration file
6 ;;;
7 ;;; Change this file to your own needs or update some of this variables in
8 ;;; your ~/.clfswmrc
9 ;;; Some simple hack can be done in the code begining with the word CONFIG
10 ;;; (you can do a 'grep CONFIG *.lisp' to see what you can configure)
11 ;;; --------------------------------------------------------------------------
12 ;;;
13 ;;; (C) 2012 Philippe Brochard <pbrochard@common-lisp.net>
14 ;;;
15 ;;; This program is free software; you can redistribute it and/or modify
16 ;;; it under the terms of the GNU General Public License as published by
17 ;;; the Free Software Foundation; either version 3 of the License, or
18 ;;; (at your option) any later version.
19 ;;;
20 ;;; This program is distributed in the hope that it will be useful,
21 ;;; but WITHOUT ANY WARRANTY; without even the implied warranty of
22 ;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
23 ;;; GNU General Public License for more details.
24 ;;;
25 ;;; You should have received a copy of the GNU General Public License
26 ;;; along with this program; if not, write to the Free Software
27 ;;; Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
28 ;;;
29 ;;; --------------------------------------------------------------------------
31 (in-package :clfswm)
34 ;;; CONFIG - Default modifiers
35 (defconfig *default-modifiers* '() nil
36 "Default modifiers list to append to explicit modifiers
37 Example: :mod-2 for num_lock, :lock for Caps_lock...")
40 ;;; Standard menu entry based on the XDG specifications
41 (defconfig *xdg-section-list* (append
42 '(TextEditor FileManager WebBrowser)
43 '(AudioVideo Audio Video Development Education Game Graphics Network
44 Office Settings System Utility)
45 '(TerminalEmulator Screensaver))
46 'Menu "Standard menu sections")
50 (defun-equal-wm-class equal-wm-class-rox-pinboard "ROX-Pinboard")
51 (defun-equal-wm-class equal-wm-class-xvkbd "xvkbd")
53 ;;; CONFIG - Never managed window list
54 (defconfig *never-managed-window-list*
55 (list (list 'equal-wm-class-rox-pinboard nil)
56 (list 'equal-wm-class-xvkbd 'raise-window)
57 (list 'equal-clfswm-terminal 'raise-and-focus-window))
58 nil "CLFSWM will never manage windows of this type.
59 A list of (list match-function handle-function)")
62 (defconfig *steal-focus* t nil
63 "Allow to streal the focus on configure request")
65 (defconfig *hide-unmanaged-window* t nil
66 "Hide or not unmanaged windows when a child is deselected.")
68 (defconfig *snap-size* 5 nil
69 "Snap size (in % of parent size) when move or resize frame is constrained")
71 (defconfig *spatial-move-delay-before* 0.2 nil
72 "Delay to display the current child before doing a spatial move")
74 (defconfig *spatial-move-delay-after* 0.5 nil
75 "Delay to display the new child after doing a spatial move")
78 (defconfig *corner-size* 3 'Corner
79 "The size of the corner square")
81 ;;; CONFIG: Corner actions - See in clfswm-corner.lisp for
82 ;;; allowed functions
83 (defconfig *corner-main-mode-left-button*
84 '((:top-left open-menu)
85 (:top-right present-virtual-keyboard)
86 (:bottom-right expose-windows-mode)
87 (:bottom-left nil))
88 'Corner "Actions on corners in the main mode with the left mouse button")
90 (defconfig *corner-main-mode-middle-button*
91 '((:top-left help-on-clfswm)
92 (:top-right ask-close/kill-current-window)
93 (:bottom-right nil)
94 (:bottom-left nil))
95 'Corner "Actions on corners in the main mode with the middle mouse button")
97 (defconfig *corner-main-mode-right-button*
98 '((:top-left present-clfswm-terminal)
99 (:top-right ask-close/kill-current-window)
100 (:bottom-right expose-all-windows-mode)
101 (:bottom-left nil))
102 'Corner "Actions on corners in the main mode with the right mouse button")
104 (defconfig *corner-second-mode-left-button*
105 '((:top-left nil)
106 (:top-right nil)
107 (:bottom-right expose-windows-mode)
108 (:bottom-left nil))
109 'Corner "Actions on corners in the second mode with the left mouse button")
111 (defconfig *corner-second-mode-middle-button*
112 '((:top-left help-on-clfswm)
113 (:top-right nil)
114 (:bottom-right nil)
115 (:bottom-left nil))
116 'Corner "Actions on corners in the second mode with the middle mouse button")
118 (defconfig *corner-second-mode-right-button*
119 '((:top-left nil)
120 (:top-right nil)
121 (:bottom-right expose-all-windows-mode)
122 (:bottom-left nil))
123 'Corner "Actions on corners in the second mode with the right mouse button")
126 (defconfig *virtual-keyboard-cmd* "xvkbd"
127 'Corner "The command to display the virtual keybaord
128 Here is an ~/.Xresources example for xvkbd:
129 xvkbd.windowGeometry: 300x100-0-0
130 xvkbd*Font: 6x12
131 xvkbd.modalKeytop: true
132 xvkbd.customization: -french
133 xvkbd.keypad: false
134 And make it always on top")
136 (defconfig *clfswm-terminal-name* "clfswm-terminal"
137 'Corner "The clfswm terminal name")
138 ;;(defparameter *clfswm-terminal-cmd* (format nil "xterm -T ~A -e /bin/bash --noprofile --norc" *clfswm-terminal-name*)
139 ;;(defparameter *clfswm-terminal-cmd* (format nil "urxvt -name ~A" *clfswm-terminal-name*)
140 (defconfig *clfswm-terminal-cmd* (format nil "xterm -T ~A" *clfswm-terminal-name*)
141 'Corner "The clfswm terminal command.
142 This command must set the window title to *clfswm-terminal-name*")
144 (defconfig *corner-error-message-color* "red"
145 'Corner "Error message color")
146 (defconfig *corner-error-message-delay* 5
147 'Corner "Time to display the error message on commad error")
148 (defconfig *corner-command-try-delay* 0.2
149 'Corner "Time to wait before checking window in query tree")
150 (defconfig *corner-command-try-number* 10
151 'Corner "Number of try to wait the window in query tree")
154 ;;; Hook definitions
156 ;;; A hook is a function, a symbol or a list of functions with a rest
157 ;;; arguments.
159 ;;; This hooks are set in clfswm.lisp, you can overwrite them or extend
160 ;;; them with a hook list.
162 ;;; See clfswm.lisp for hooks examples.
164 (defconfig *init-hook* '(default-init-hook display-hello-window)
165 'Hook "Init hook. This hook is run just after the first root frame is created")
167 (defconfig *close-hook* '(close-notify-window close-clfswm-terminal close-virtual-keyboard)
168 'Hook "Close hook. This hook is run just before closing the display")
170 (defconfig *default-nw-hook* 'default-frame-nw-hook
171 'Hook "Default action to do on newly created windows")
173 (defconfig *query-key-press-hook* nil
174 'Hook "Query hook. Hook called on each key press event in query loop")
175 (defconfig *query-button-press-hook* nil
176 'Hook "Query hook. Hook called on each button press event in query loop")
178 ;;; CONFIG: Root
179 (defconfig *create-frame-on-root* nil
180 'Root "Create frame on root.
181 Set this variable to true if you want to allow to create a new frame
182 on the root window in the main mode with the mouse")
183 (defconfig *have-to-show-current-root* t
184 'Root "Show the current root if true")
185 (defconfig *show-current-root-delay* 1
186 'Root "Delay to show the current root")
187 (defconfig *show-current-root-placement* 'middle-middle-root-placement
188 'Root "Current root notify window placement")
189 (defconfig *show-current-root-message* "Current root"
190 'Root "Current root notify window message")
193 ;;; CONFIG: Main mode colors
194 (defconfig *color-selected* "Red"
195 'Main-mode "Color of selected window")
196 (defconfig *color-unselected* "Blue"
197 'Main-mode "Color of unselected color")
198 (defconfig *color-maybe-selected* "Yellow"
199 'Main-mode "Color of maybe selected windows")
202 ;;; CONFIG: Frame colors
203 (defconfig *frame-background* "Black"
204 'Frame-colors "Frame background")
205 (defconfig *frame-foreground* "Green"
206 'Frame-colors "Frame foreground")
207 (defconfig *frame-foreground-root* "Red"
208 'Frame-colors "Frame foreground when the frame is the root frame")
209 (defconfig *frame-foreground-hidden* "Darkgreen"
210 'Frame-colors "Frame foreground for hidden windows")
211 (defconfig *frame-transparency* 0.6
212 'Frame-colors "Frame background transparency")
214 ;;; CONFIG: Default window size
215 (defconfig *default-window-width* 400
216 nil "Default window width")
217 (defconfig *default-window-height* 300
218 nil "Default window height")
220 ;;; CONFIG: Second mode colors and fonts
221 (defconfig *sm-border-color* "Green"
222 'Second-mode "Second mode window border color")
223 (defconfig *sm-background-color* "Black"
224 'Second-mode "Second mode window background color")
225 (defconfig *sm-foreground-color* "Red"
226 'Second-mode "Second mode window foreground color")
227 (defconfig *sm-font-string* *default-font-string*
228 'Second-mode "Second mode window font string")
229 (defconfig *sm-width* 300
230 'Second-mode "Second mode window width")
231 (defconfig *sm-height* 25
232 'Second-mode "Second mode window height")
233 (defconfig *sm-transparency* *default-transparency*
234 'Second-mode "Second mode background transparency")
239 ;;; CONFIG - Identify key colors
240 (defconfig *identify-font-string* *default-font-string*
241 'Identify-key "Identify window font string")
242 (defconfig *identify-background* "black"
243 'Identify-key "Identify window background color")
244 (defconfig *identify-foreground* "green"
245 'Identify-key "Identify window foreground color")
246 (defconfig *identify-border* "red"
247 'Identify-key "Identify window border color")
248 (defconfig *identify-transparency* *default-transparency*
249 'Identify-key "Identify window background transparency")
251 ;;; CONFIG - Query string colors
252 (defconfig *query-font-string* *default-font-string*
253 'Query-string "Query string window font string")
254 (defconfig *query-background* "black"
255 'Query-string "Query string window background color")
256 (defconfig *query-message-color* "yellow"
257 'Query-string "Query string window message color")
258 (defconfig *query-foreground* "green"
259 'Query-string "Query string window foreground color")
260 (defconfig *query-cursor-color* "white"
261 'Query-string "Query string window foreground cursor color")
262 (defconfig *query-parent-color* "blue"
263 'Query-string "Query string window parenthesis color")
264 (defconfig *query-parent-error-color* "red"
265 'Query-string "Query string window parenthesis color when no match")
266 (defconfig *query-border* "red"
267 'Query-string "Query string window border color")
268 (defconfig *query-transparency* *default-transparency*
269 'Query-string "Query string window background transparency")
270 (defconfig *query-max-complet-length* 100
271 'Query-string "Query maximum length of completion list")
272 (defconfig *query-min-complet-char* 2
273 'Query-string "Query minimum input length for completion")
276 ;;; CONFIG - Info mode
277 (defconfig *info-background* "black"
278 'Info-mode "Info window background color")
279 (defconfig *info-foreground* "green"
280 'Info-mode "Info window foreground color")
281 (defconfig *info-border* "red"
282 'Info-mode "Info window border color")
283 (defconfig *info-line-cursor* "white"
284 'Info-mode "Info window line cursor color color")
285 (defconfig *info-selected-background* "blue"
286 'Info-mode "Info selected item background color")
287 (defconfig *info-font-string* *default-font-string*
288 'Info-mode "Info window font string")
289 (defconfig *info-transparency* *default-transparency*
290 'Info-mode "Info window background transparency")
292 (defconfig *info-click-to-select* t
293 'Info-mode "If true, click on info window select item. Otherwise, click to drag the menu")
295 ;;; CONFIG - Circulate string colors
296 (defconfig *circulate-font-string* *default-font-string*
297 'Circulate-mode "Circulate string window font string")
298 (defconfig *circulate-background* "black"
299 'Circulate-mode "Circulate string window background color")
300 (defconfig *circulate-foreground* "green"
301 'Circulate-mode "Circulate string window foreground color")
302 (defconfig *circulate-border* "red"
303 'Circulate-mode "Circulate string window border color")
304 (defconfig *circulate-width* 400
305 'Circulate-mode "Circulate mode window width")
306 (defconfig *circulate-height* 15
307 'Circulate-mode "Circulate mode window height")
308 (defconfig *circulate-transparency* *default-transparency*
309 'Circulate-mode "Circulate window background transparency")
312 (defconfig *circulate-text-limite* 30
313 'Circulate-mode "Maximum text limite in the circulate window")
316 ;;; CONFIG - Expose string colors
317 (defconfig *expose-font-string* *default-font-string*
318 'Expose-mode "Expose string window font string")
319 (defconfig *expose-background* "grey10"
320 'Expose-mode "Expose string window background color")
321 (defconfig *expose-foreground* "grey50"
322 'Expose-mode "Expose string window foreground color")
323 (defconfig *expose-foreground-letter* "red"
324 'Expose-mode "Expose string window foreground color for letters")
325 (defconfig *expose-foreground-letter-nok* "grey30"
326 'Expose-mode "Expose string window foreground color for letter not selected")
327 (defconfig *expose-background-letter-match* "green"
328 'Expose-mode "Expose string window background color for matching letters")
329 (defconfig *expose-border* "grey20"
330 'Expose-mode "Expose string window border color")
331 (defconfig *expose-valid-on-key* t
332 'Expose-mode "Valid expose mode when an accel key is pressed")
333 (defconfig *expose-show-window-title* t
334 'Expose-mode "Show the window title on accel window")
335 (defconfig *expose-transparency* 0.9
336 'Expose-mode "Expose string window background transparency")
337 (defconfig *expose-direct-select* t
338 'Expose-mode "Immediately select child if they can be directly accessed")
341 ;;; CONFIG - Show key binding colors
342 (defconfig *info-color-title* "Magenta"
343 'Info-mode "Colored info title color")
344 (defconfig *info-color-underline* "Yellow"
345 'Info-mode "Colored info underline color")
346 (defconfig *info-color-first* "Cyan"
347 'Info-mode "Colored info first color")
348 (defconfig *info-color-second* "lightblue"
349 'Info-mode "Colored info second color")
352 ;;; CONFIG - Menu colors
353 ;;; Set *info-foreground* to change the default menu foreground
354 (defconfig *menu-color-submenu* "Cyan"
355 'Menu "Submenu color in menu")
356 (defconfig *menu-color-comment* "Yellow"
357 'Menu "Comment color in menu")
358 (defconfig *menu-color-key* "Magenta"
359 'Menu "Key color in menu")
360 (defconfig *menu-color-menu-key* (->color #xFF9AFF)
361 'Menu "Menu key color in menu")
362 (defconfig *menu-key-bound-color* "gray50"
363 'Menu "Key bound min menu color")
366 ;;; CONFIG - Notify window string colors
367 (defconfig *notify-window-font-string* *default-font-string*
368 'Notify-Window "Notify window font string")
369 (defconfig *notify-window-background* "black"
370 'Notify-Window "Notify Window background color")
371 (defconfig *notify-window-foreground* "green"
372 'Notify-Window "Notify Window foreground color")
373 (defconfig *notify-window-border* "red"
374 'Notify-Window "Notify Window border color")
375 (defconfig *notify-window-delay* 10
376 'Notify-Window "Notify Window display delay")
377 (defconfig *notify-window-transparency* *default-transparency*
378 'Notify-window "Notify window background transparency")