src/clfswm-util.lisp (eval-from-query-string): Add completion for eval for query...
[clfswm.git] / src / config.lisp
blobe651c4b7265ef70d7e31f5eb9839750581dbe30c
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) 2011 Philippe Brochard <hocwp@free.fr>
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
163 place-frames-from-xinerama-infos
164 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")
176 ;;; CONFIG
177 (defconfig *create-frame-on-root* nil
178 nil "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")
183 ;;; CONFIG: Main mode colors
184 (defconfig *color-selected* "Red"
185 'Main-mode "Color of selected window")
186 (defconfig *color-unselected* "Blue"
187 'Main-mode "Color of unselected color")
188 (defconfig *color-maybe-selected* "Yellow"
189 'Main-mode "Color of maybe selected windows")
192 ;;; CONFIG: Frame colors
193 (defconfig *frame-background* "Black"
194 'Frame-colors "Frame background")
195 (defconfig *frame-foreground* "Green"
196 'Frame-colors "Frame foreground")
197 (defconfig *frame-foreground-root* "Red"
198 'Frame-colors "Frame foreground when the frame is the root frame")
199 (defconfig *frame-foreground-hidden* "Darkgreen"
200 'Frame-colors "Frame foreground for hidden windows")
201 (defconfig *frame-transparency* *default-transparency*
202 'Frame-colors "Frame background transparency")
204 ;;; CONFIG: Default window size
205 (defconfig *default-window-width* 400
206 nil "Default window width")
207 (defconfig *default-window-height* 300
208 nil "Default window height")
210 ;;; CONFIG: Second mode colors and fonts
211 (defconfig *sm-border-color* "Green"
212 'Second-mode "Second mode window border color")
213 (defconfig *sm-background-color* "Black"
214 'Second-mode "Second mode window background color")
215 (defconfig *sm-foreground-color* "Red"
216 'Second-mode "Second mode window foreground color")
217 (defconfig *sm-font-string* *default-font-string*
218 'Second-mode "Second mode window font string")
219 (defconfig *sm-width* 300
220 'Second-mode "Second mode window width")
221 (defconfig *sm-height* 25
222 'Second-mode "Second mode window height")
223 (defconfig *sm-transparency* *default-transparency*
224 'Second-mode "Second mode background transparency")
229 ;;; CONFIG - Identify key colors
230 (defconfig *identify-font-string* *default-font-string*
231 'Identify-key "Identify window font string")
232 (defconfig *identify-background* "black"
233 'Identify-key "Identify window background color")
234 (defconfig *identify-foreground* "green"
235 'Identify-key "Identify window foreground color")
236 (defconfig *identify-border* "red"
237 'Identify-key "Identify window border color")
238 (defconfig *identify-transparency* *default-transparency*
239 'Identify-key "Identify window background transparency")
241 ;;; CONFIG - Query string colors
242 (defconfig *query-font-string* *default-font-string*
243 'Query-string "Query string window font string")
244 (defconfig *query-background* "black"
245 'Query-string "Query string window background color")
246 (defconfig *query-message-color* "yellow"
247 'Query-string "Query string window message color")
248 (defconfig *query-foreground* "green"
249 'Query-string "Query string window foreground color")
250 (defconfig *query-cursor-color* "white"
251 'Query-string "Query string window foreground cursor color")
252 (defconfig *query-parent-color* "blue"
253 'Query-string "Query string window parenthesis color")
254 (defconfig *query-parent-error-color* "red"
255 'Query-string "Query string window parenthesis color when no match")
256 (defconfig *query-border* "red"
257 'Query-string "Query string window border color")
258 (defconfig *query-transparency* *default-transparency*
259 'Query-string "Query string window background transparency")
260 (defconfig *query-max-complet-length* 100
261 'Query-string "Query maximum length of completion list")
262 (defconfig *query-min-complet-char* 2
263 'Query-string "Query minimum input length for completion")
266 ;;; CONFIG - Info mode
267 (defconfig *info-background* "black"
268 'Info-mode "Info window background color")
269 (defconfig *info-foreground* "green"
270 'Info-mode "Info window foreground color")
271 (defconfig *info-border* "red"
272 'Info-mode "Info window border color")
273 (defconfig *info-line-cursor* "white"
274 'Info-mode "Info window line cursor color color")
275 (defconfig *info-selected-background* "blue"
276 'Info-mode "Info selected item background color")
277 (defconfig *info-font-string* *default-font-string*
278 'Info-mode "Info window font string")
279 (defconfig *info-transparency* *default-transparency*
280 'Info-mode "Info window background transparency")
282 (defconfig *info-click-to-select* t
283 'Info-mode "If true, click on info window select item. Otherwise, click to drag the menu")
285 ;;; CONFIG - Circulate string colors
286 (defconfig *circulate-font-string* *default-font-string*
287 'Circulate-mode "Circulate string window font string")
288 (defconfig *circulate-background* "black"
289 'Circulate-mode "Circulate string window background color")
290 (defconfig *circulate-foreground* "green"
291 'Circulate-mode "Circulate string window foreground color")
292 (defconfig *circulate-border* "red"
293 'Circulate-mode "Circulate string window border color")
294 (defconfig *circulate-width* 400
295 'Circulate-mode "Circulate mode window width")
296 (defconfig *circulate-height* 15
297 'Circulate-mode "Circulate mode window height")
298 (defconfig *circulate-transparency* *default-transparency*
299 'Circulate-mode "Circulate window background transparency")
302 (defconfig *circulate-text-limite* 30
303 'Circulate-mode "Maximum text limite in the circulate window")
306 ;;; CONFIG - Expose string colors
307 (defconfig *expose-font-string* *default-font-string*
308 'Expose-mode "Expose string window font string")
309 (defconfig *expose-background* "black"
310 'Expose-mode "Expose string window background color")
311 (defconfig *expose-foreground* "green"
312 'Expose-mode "Expose string window foreground color")
313 (defconfig *expose-border* "red"
314 'Expose-mode "Expose string window border color")
315 (defconfig *expose-valid-on-key* t
316 'Expose-mode "Valid expose mode when an accel key is pressed")
317 (defconfig *expose-show-window-title* t
318 'Expose-mode "Show the window title on accel window")
319 (defconfig *expose-transparency* *default-transparency*
320 'Expose-mode "Expose string window background transparency")
324 ;;; CONFIG - Show key binding colors
325 (defconfig *info-color-title* "Magenta"
326 'Info-mode "Colored info title color")
327 (defconfig *info-color-underline* "Yellow"
328 'Info-mode "Colored info underline color")
329 (defconfig *info-color-first* "Cyan"
330 'Info-mode "Colored info first color")
331 (defconfig *info-color-second* "lightblue"
332 'Info-mode "Colored info second color")
335 ;;; CONFIG - Menu colors
336 ;;; Set *info-foreground* to change the default menu foreground
337 (defconfig *menu-color-submenu* "Cyan"
338 'Menu "Submenu color in menu")
339 (defconfig *menu-color-comment* "Yellow"
340 'Menu "Comment color in menu")
341 (defconfig *menu-color-key* "Magenta"
342 'Menu "Key color in menu")
343 (defconfig *menu-color-menu-key* (->color #xFF9AFF)
344 'Menu "Menu key color in menu")
347 ;;; CONFIG - Notify window string colors
348 (defconfig *notify-window-font-string* *default-font-string*
349 'Notify-Window "Notify window font string")
350 (defconfig *notify-window-background* "black"
351 'Notify-Window "Notify Window background color")
352 (defconfig *notify-window-foreground* "green"
353 'Notify-Window "Notify Window foreground color")
354 (defconfig *notify-window-border* "red"
355 'Notify-Window "Notify Window border color")
356 (defconfig *notify-window-delay* 10
357 'Notify-Window "Notify Window display delay")
358 (defconfig *notify-window-transparency* *default-transparency*
359 'Notify-window "Notify window background transparency")