src/clfswm-expose-mode.lisp: New expose mode based on standard query input.
[clfswm.git] / src / config.lisp
blobf9292f43539ac4871ffd05902c31b8a17ec5589a
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")
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
179 (defconfig *create-frame-on-root* nil
180 nil "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")
185 ;;; CONFIG: Main mode colors
186 (defconfig *color-selected* "Red"
187 'Main-mode "Color of selected window")
188 (defconfig *color-unselected* "Blue"
189 'Main-mode "Color of unselected color")
190 (defconfig *color-maybe-selected* "Yellow"
191 'Main-mode "Color of maybe selected windows")
194 ;;; CONFIG: Frame colors
195 (defconfig *frame-background* "Black"
196 'Frame-colors "Frame background")
197 (defconfig *frame-foreground* "Green"
198 'Frame-colors "Frame foreground")
199 (defconfig *frame-foreground-root* "Red"
200 'Frame-colors "Frame foreground when the frame is the root frame")
201 (defconfig *frame-foreground-hidden* "Darkgreen"
202 'Frame-colors "Frame foreground for hidden windows")
203 (defconfig *frame-transparency* *default-transparency*
204 'Frame-colors "Frame background transparency")
206 ;;; CONFIG: Default window size
207 (defconfig *default-window-width* 400
208 nil "Default window width")
209 (defconfig *default-window-height* 300
210 nil "Default window height")
212 ;;; CONFIG: Second mode colors and fonts
213 (defconfig *sm-border-color* "Green"
214 'Second-mode "Second mode window border color")
215 (defconfig *sm-background-color* "Black"
216 'Second-mode "Second mode window background color")
217 (defconfig *sm-foreground-color* "Red"
218 'Second-mode "Second mode window foreground color")
219 (defconfig *sm-font-string* *default-font-string*
220 'Second-mode "Second mode window font string")
221 (defconfig *sm-width* 300
222 'Second-mode "Second mode window width")
223 (defconfig *sm-height* 25
224 'Second-mode "Second mode window height")
225 (defconfig *sm-transparency* *default-transparency*
226 'Second-mode "Second mode background transparency")
231 ;;; CONFIG - Identify key colors
232 (defconfig *identify-font-string* *default-font-string*
233 'Identify-key "Identify window font string")
234 (defconfig *identify-background* "black"
235 'Identify-key "Identify window background color")
236 (defconfig *identify-foreground* "green"
237 'Identify-key "Identify window foreground color")
238 (defconfig *identify-border* "red"
239 'Identify-key "Identify window border color")
240 (defconfig *identify-transparency* *default-transparency*
241 'Identify-key "Identify window background transparency")
243 ;;; CONFIG - Query string colors
244 (defconfig *query-font-string* *default-font-string*
245 'Query-string "Query string window font string")
246 (defconfig *query-background* "black"
247 'Query-string "Query string window background color")
248 (defconfig *query-message-color* "yellow"
249 'Query-string "Query string window message color")
250 (defconfig *query-foreground* "green"
251 'Query-string "Query string window foreground color")
252 (defconfig *query-cursor-color* "white"
253 'Query-string "Query string window foreground cursor color")
254 (defconfig *query-parent-color* "blue"
255 'Query-string "Query string window parenthesis color")
256 (defconfig *query-parent-error-color* "red"
257 'Query-string "Query string window parenthesis color when no match")
258 (defconfig *query-border* "red"
259 'Query-string "Query string window border color")
260 (defconfig *query-transparency* *default-transparency*
261 'Query-string "Query string window background transparency")
262 (defconfig *query-max-complet-length* 100
263 'Query-string "Query maximum length of completion list")
264 (defconfig *query-min-complet-char* 2
265 'Query-string "Query minimum input length for completion")
268 ;;; CONFIG - Info mode
269 (defconfig *info-background* "black"
270 'Info-mode "Info window background color")
271 (defconfig *info-foreground* "green"
272 'Info-mode "Info window foreground color")
273 (defconfig *info-border* "red"
274 'Info-mode "Info window border color")
275 (defconfig *info-line-cursor* "white"
276 'Info-mode "Info window line cursor color color")
277 (defconfig *info-selected-background* "blue"
278 'Info-mode "Info selected item background color")
279 (defconfig *info-font-string* *default-font-string*
280 'Info-mode "Info window font string")
281 (defconfig *info-transparency* *default-transparency*
282 'Info-mode "Info window background transparency")
284 (defconfig *info-click-to-select* t
285 'Info-mode "If true, click on info window select item. Otherwise, click to drag the menu")
287 ;;; CONFIG - Circulate string colors
288 (defconfig *circulate-font-string* *default-font-string*
289 'Circulate-mode "Circulate string window font string")
290 (defconfig *circulate-background* "black"
291 'Circulate-mode "Circulate string window background color")
292 (defconfig *circulate-foreground* "green"
293 'Circulate-mode "Circulate string window foreground color")
294 (defconfig *circulate-border* "red"
295 'Circulate-mode "Circulate string window border color")
296 (defconfig *circulate-width* 400
297 'Circulate-mode "Circulate mode window width")
298 (defconfig *circulate-height* 15
299 'Circulate-mode "Circulate mode window height")
300 (defconfig *circulate-transparency* *default-transparency*
301 'Circulate-mode "Circulate window background transparency")
304 (defconfig *circulate-text-limite* 30
305 'Circulate-mode "Maximum text limite in the circulate window")
308 ;;; CONFIG - Expose string colors
309 (defconfig *expose-font-string* *default-font-string*
310 'Expose-mode "Expose string window font string")
311 (defconfig *expose-background* "grey10"
312 'Expose-mode "Expose string window background color")
313 (defconfig *expose-foreground* "grey50"
314 'Expose-mode "Expose string window foreground color")
315 (defconfig *expose-foreground-letter* "red"
316 'Expose-mode "Expose string window foreground color for letters")
317 (defconfig *expose-foreground-letter-nok* "grey30"
318 'Expose-mode "Expose string window foreground color for letter not selected")
319 (defconfig *expose-background-letter-match* "green"
320 'Expose-mode "Expose string window background color for matching letters")
321 (defconfig *expose-border* "grey20"
322 'Expose-mode "Expose string window border color")
323 (defconfig *expose-valid-on-key* t
324 'Expose-mode "Valid expose mode when an accel key is pressed")
325 (defconfig *expose-show-window-title* t
326 'Expose-mode "Show the window title on accel window")
327 (defconfig *expose-transparency* *default-transparency*
328 'Expose-mode "Expose string window background transparency")
332 ;;; CONFIG - Show key binding colors
333 (defconfig *info-color-title* "Magenta"
334 'Info-mode "Colored info title color")
335 (defconfig *info-color-underline* "Yellow"
336 'Info-mode "Colored info underline color")
337 (defconfig *info-color-first* "Cyan"
338 'Info-mode "Colored info first color")
339 (defconfig *info-color-second* "lightblue"
340 'Info-mode "Colored info second color")
343 ;;; CONFIG - Menu colors
344 ;;; Set *info-foreground* to change the default menu foreground
345 (defconfig *menu-color-submenu* "Cyan"
346 'Menu "Submenu color in menu")
347 (defconfig *menu-color-comment* "Yellow"
348 'Menu "Comment color in menu")
349 (defconfig *menu-color-key* "Magenta"
350 'Menu "Key color in menu")
351 (defconfig *menu-color-menu-key* (->color #xFF9AFF)
352 'Menu "Menu key color in menu")
355 ;;; CONFIG - Notify window string colors
356 (defconfig *notify-window-font-string* *default-font-string*
357 'Notify-Window "Notify window font string")
358 (defconfig *notify-window-background* "black"
359 'Notify-Window "Notify Window background color")
360 (defconfig *notify-window-foreground* "green"
361 'Notify-Window "Notify Window foreground color")
362 (defconfig *notify-window-border* "red"
363 'Notify-Window "Notify Window border color")
364 (defconfig *notify-window-delay* 10
365 'Notify-Window "Notify Window display delay")
366 (defconfig *notify-window-transparency* *default-transparency*
367 'Notify-window "Notify window background transparency")