Move or resize blank window with the mouse
[clfswm.git] / src / config.lisp
blob6d0932d8d54c8843b5892ecf38254661f3f0b3c6
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)")
63 (defconfig *hide-unmanaged-window* t nil
64 "Hide or not unmanaged windows when a child is deselected.")
66 (defconfig *snap-size* 5 nil
67 "Snap size (in % of parent size) when move or resize frame is constrained")
69 (defconfig *spatial-move-delay-before* 0.2 nil
70 "Delay to display the current child before doing a spatial move")
72 (defconfig *spatial-move-delay-after* 0.5 nil
73 "Delay to display the new child after doing a spatial move")
76 (defconfig *corner-size* 3 'Corner
77 "The size of the corner square")
79 ;;; CONFIG: Corner actions - See in clfswm-corner.lisp for
80 ;;; allowed functions
81 (defconfig *corner-main-mode-left-button*
82 '((:top-left open-menu)
83 (:top-right present-virtual-keyboard)
84 (:bottom-right expose-windows-mode)
85 (:bottom-left nil))
86 'Corner "Actions on corners in the main mode with the left mouse button")
88 (defconfig *corner-main-mode-middle-button*
89 '((:top-left help-on-clfswm)
90 (:top-right ask-close/kill-current-window)
91 (:bottom-right nil)
92 (:bottom-left nil))
93 'Corner "Actions on corners in the main mode with the middle mouse button")
95 (defconfig *corner-main-mode-right-button*
96 '((:top-left present-clfswm-terminal)
97 (:top-right ask-close/kill-current-window)
98 (:bottom-right expose-all-windows-mode)
99 (:bottom-left nil))
100 'Corner "Actions on corners in the main mode with the right mouse button")
102 (defconfig *corner-second-mode-left-button*
103 '((:top-left nil)
104 (:top-right nil)
105 (:bottom-right expose-windows-mode)
106 (:bottom-left nil))
107 'Corner "Actions on corners in the second mode with the left mouse button")
109 (defconfig *corner-second-mode-middle-button*
110 '((:top-left help-on-clfswm)
111 (:top-right nil)
112 (:bottom-right nil)
113 (:bottom-left nil))
114 'Corner "Actions on corners in the second mode with the middle mouse button")
116 (defconfig *corner-second-mode-right-button*
117 '((:top-left nil)
118 (:top-right nil)
119 (:bottom-right expose-all-windows-mode)
120 (:bottom-left nil))
121 'Corner "Actions on corners in the second mode with the right mouse button")
124 (defconfig *virtual-keyboard-cmd* "xvkbd"
125 'Corner "The command to display the virtual keybaord
126 Here is an ~/.Xresources example for xvkbd:
127 xvkbd.windowGeometry: 300x100-0-0
128 xvkbd*Font: 6x12
129 xvkbd.modalKeytop: true
130 xvkbd.customization: -french
131 xvkbd.keypad: false
132 And make it always on top")
134 (defconfig *clfswm-terminal-name* "clfswm-terminal"
135 'Corner "The clfswm terminal name")
136 ;;(defparameter *clfswm-terminal-cmd* (format nil "xterm -T ~A -e /bin/bash --noprofile --norc" *clfswm-terminal-name*)
137 ;;(defparameter *clfswm-terminal-cmd* (format nil "urxvt -name ~A" *clfswm-terminal-name*)
138 (defconfig *clfswm-terminal-cmd* (format nil "xterm -T ~A" *clfswm-terminal-name*)
139 'Corner "The clfswm terminal command.
140 This command must set the window title to *clfswm-terminal-name*")
142 (defconfig *corner-error-message-color* "red"
143 'Corner "Error message color")
144 (defconfig *corner-error-message-delay* 5
145 'Corner "Time to display the error message on commad error")
146 (defconfig *corner-command-try-delay* 0.2
147 'Corner "Time to wait before checking window in query tree")
148 (defconfig *corner-command-try-number* 10
149 'Corner "Number of try to wait the window in query tree")
152 ;;; Hook definitions
154 ;;; A hook is a function, a symbol or a list of functions with a rest
155 ;;; arguments.
157 ;;; This hooks are set in clfswm.lisp, you can overwrite them or extend
158 ;;; them with a hook list.
160 ;;; See clfswm.lisp for hooks examples.
162 (defconfig *init-hook* '(default-init-hook display-hello-window)
163 'Hook "Init hook. This hook is run just after the first root frame is created")
165 (defconfig *close-hook* '(close-notify-window close-clfswm-terminal close-virtual-keyboard)
166 'Hook "Close hook. This hook is run just before closing the display")
168 (defconfig *default-nw-hook* 'default-frame-nw-hook
169 'Hook "Default action to do on newly created windows")
171 (defconfig *query-key-press-hook* nil
172 'Hook "Query hook. Hook called on each key press event in query loop")
173 (defconfig *query-button-press-hook* nil
174 'Hook "Query hook. Hook called on each button press event in query loop")
176 ;;; CONFIG: Root
177 (defconfig *create-frame-on-root* nil
178 'Root "Create frame on root.
179 Set this variable to true if you want to allow to create a new frame
180 on the root window in the main mode with the mouse")
181 (defconfig *have-to-show-current-root* t
182 'Root "Show the current root if true")
183 (defconfig *show-current-root-delay* 1
184 'Root "Delay to show the current root")
185 (defconfig *show-current-root-placement* 'middle-middle-root-placement
186 'Root "Current root notify window placement")
187 (defconfig *show-current-root-message* "Current root"
188 'Root "Current root notify window message")
191 ;;; CONFIG: Main mode colors
192 (defconfig *color-selected* "Red"
193 'Main-mode "Color of selected window")
194 (defconfig *color-unselected* "Blue"
195 'Main-mode "Color of unselected color")
196 (defconfig *color-maybe-selected* "Yellow"
197 'Main-mode "Color of maybe selected windows")
200 ;;; CONFIG: Frame colors
201 (defconfig *frame-background* "Black"
202 'Frame-colors "Frame background")
203 (defconfig *frame-foreground* "Green"
204 'Frame-colors "Frame foreground")
205 (defconfig *frame-foreground-root* "Red"
206 'Frame-colors "Frame foreground when the frame is the root frame")
207 (defconfig *frame-foreground-hidden* "Darkgreen"
208 'Frame-colors "Frame foreground for hidden windows")
209 (defconfig *frame-transparency* 0.6
210 'Frame-colors "Frame background transparency")
212 ;;; CONFIG: Default window size
213 (defconfig *default-window-width* 400
214 nil "Default window width")
215 (defconfig *default-window-height* 300
216 nil "Default window height")
218 ;;; CONFIG: Second mode colors and fonts
219 (defconfig *sm-border-color* "Green"
220 'Second-mode "Second mode window border color")
221 (defconfig *sm-background-color* "Black"
222 'Second-mode "Second mode window background color")
223 (defconfig *sm-foreground-color* "Red"
224 'Second-mode "Second mode window foreground color")
225 (defconfig *sm-font-string* *default-font-string*
226 'Second-mode "Second mode window font string")
227 (defconfig *sm-width* 300
228 'Second-mode "Second mode window width")
229 (defconfig *sm-height* 25
230 'Second-mode "Second mode window height")
231 (defconfig *sm-transparency* *default-transparency*
232 'Second-mode "Second mode background transparency")
237 ;;; CONFIG - Identify key colors
238 (defconfig *identify-font-string* *default-font-string*
239 'Identify-key "Identify window font string")
240 (defconfig *identify-background* "black"
241 'Identify-key "Identify window background color")
242 (defconfig *identify-foreground* "green"
243 'Identify-key "Identify window foreground color")
244 (defconfig *identify-border* "red"
245 'Identify-key "Identify window border color")
246 (defconfig *identify-transparency* *default-transparency*
247 'Identify-key "Identify window background transparency")
249 ;;; CONFIG - Query string colors
250 (defconfig *query-font-string* *default-font-string*
251 'Query-string "Query string window font string")
252 (defconfig *query-background* "black"
253 'Query-string "Query string window background color")
254 (defconfig *query-message-color* "yellow"
255 'Query-string "Query string window message color")
256 (defconfig *query-foreground* "green"
257 'Query-string "Query string window foreground color")
258 (defconfig *query-cursor-color* "white"
259 'Query-string "Query string window foreground cursor color")
260 (defconfig *query-parent-color* "blue"
261 'Query-string "Query string window parenthesis color")
262 (defconfig *query-parent-error-color* "red"
263 'Query-string "Query string window parenthesis color when no match")
264 (defconfig *query-border* "red"
265 'Query-string "Query string window border color")
266 (defconfig *query-transparency* *default-transparency*
267 'Query-string "Query string window background transparency")
268 (defconfig *query-max-complet-length* 100
269 'Query-string "Query maximum length of completion list")
270 (defconfig *query-min-complet-char* 2
271 'Query-string "Query minimum input length for completion")
274 ;;; CONFIG - Info mode
275 (defconfig *info-background* "black"
276 'Info-mode "Info window background color")
277 (defconfig *info-foreground* "green"
278 'Info-mode "Info window foreground color")
279 (defconfig *info-border* "red"
280 'Info-mode "Info window border color")
281 (defconfig *info-line-cursor* "white"
282 'Info-mode "Info window line cursor color color")
283 (defconfig *info-selected-background* "blue"
284 'Info-mode "Info selected item background color")
285 (defconfig *info-font-string* *default-font-string*
286 'Info-mode "Info window font string")
287 (defconfig *info-transparency* *default-transparency*
288 'Info-mode "Info window background transparency")
290 (defconfig *info-click-to-select* t
291 'Info-mode "If true, click on info window select item. Otherwise, click to drag the menu")
293 ;;; CONFIG - Circulate string colors
294 (defconfig *circulate-font-string* *default-font-string*
295 'Circulate-mode "Circulate string window font string")
296 (defconfig *circulate-background* "black"
297 'Circulate-mode "Circulate string window background color")
298 (defconfig *circulate-foreground* "green"
299 'Circulate-mode "Circulate string window foreground color")
300 (defconfig *circulate-border* "red"
301 'Circulate-mode "Circulate string window border color")
302 (defconfig *circulate-width* 400
303 'Circulate-mode "Circulate mode window width")
304 (defconfig *circulate-height* 15
305 'Circulate-mode "Circulate mode window height")
306 (defconfig *circulate-transparency* *default-transparency*
307 'Circulate-mode "Circulate window background transparency")
310 (defconfig *circulate-text-limite* 30
311 'Circulate-mode "Maximum text limite in the circulate window")
314 ;;; CONFIG - Expose string colors
315 (defconfig *expose-font-string* *default-font-string*
316 'Expose-mode "Expose string window font string")
317 (defconfig *expose-background* "grey10"
318 'Expose-mode "Expose string window background color")
319 (defconfig *expose-foreground* "grey50"
320 'Expose-mode "Expose string window foreground color")
321 (defconfig *expose-foreground-letter* "red"
322 'Expose-mode "Expose string window foreground color for letters")
323 (defconfig *expose-foreground-letter-nok* "grey30"
324 'Expose-mode "Expose string window foreground color for letter not selected")
325 (defconfig *expose-background-letter-match* "green"
326 'Expose-mode "Expose string window background color for matching letters")
327 (defconfig *expose-border* "grey20"
328 'Expose-mode "Expose string window border color")
329 (defconfig *expose-valid-on-key* t
330 'Expose-mode "Valid expose mode when an accel key is pressed")
331 (defconfig *expose-show-window-title* t
332 'Expose-mode "Show the window title on accel window")
333 (defconfig *expose-transparency* 0.9
334 'Expose-mode "Expose string window background transparency")
335 (defconfig *expose-direct-select* t
336 'Expose-mode "Immediately select child if they can be directly accessed")
339 ;;; CONFIG - Show key binding colors
340 (defconfig *info-color-title* "Magenta"
341 'Info-mode "Colored info title color")
342 (defconfig *info-color-underline* "Yellow"
343 'Info-mode "Colored info underline color")
344 (defconfig *info-color-first* "Cyan"
345 'Info-mode "Colored info first color")
346 (defconfig *info-color-second* "lightblue"
347 'Info-mode "Colored info second color")
350 ;;; CONFIG - Menu colors
351 ;;; Set *info-foreground* to change the default menu foreground
352 (defconfig *menu-color-submenu* "Cyan"
353 'Menu "Submenu color in menu")
354 (defconfig *menu-color-comment* "Yellow"
355 'Menu "Comment color in menu")
356 (defconfig *menu-color-key* "Magenta"
357 'Menu "Key color in menu")
358 (defconfig *menu-color-menu-key* (->color #xFF9AFF)
359 'Menu "Menu key color in menu")
360 (defconfig *menu-key-bound-color* "gray50"
361 'Menu "Key bound min menu color")
364 ;;; CONFIG - Notify window string colors
365 (defconfig *notify-window-font-string* *default-font-string*
366 'Notify-Window "Notify window font string")
367 (defconfig *notify-window-background* "black"
368 'Notify-Window "Notify Window background color")
369 (defconfig *notify-window-foreground* "green"
370 'Notify-Window "Notify Window foreground color")
371 (defconfig *notify-window-border* "red"
372 'Notify-Window "Notify Window border color")
373 (defconfig *notify-window-delay* 10
374 'Notify-Window "Notify Window display delay")
375 (defconfig *notify-window-transparency* *default-transparency*
376 'Notify-window "Notify window background transparency")