Update corners from present-windows to expose-windows-mode
[clfswm.git] / src / config.lisp
blob8dfc8e460b02228543b3ac9970710c1c27bb2217
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) 2010 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 - Compress motion notify ?
35 ;; This variable may be useful to speed up some slow version of CLX.
36 ;; It is particulary useful with CLISP/MIT-CLX.
37 (setf *have-to-compress-notify* t)
41 ;;; CONFIG - Default modifiers
42 (defparameter *default-modifiers* '()
43 "Config(): Default modifiers list to append to explicit modifiers
44 Example: :mod-2 for num_lock, :lock for Caps_lock...")
49 ;;; CONFIG - Never managed window list
50 (defparameter *never-managed-window-list*
51 '((xlib:get-wm-class "ROX-Pinboard")
52 (xlib:get-wm-class "xvkbd")
53 (xlib:wm-name "clfswm-terminal"))
54 "Config(): CLFSWM will never manage windows of this type.
55 A list of (predicate-function-on-window expected-string)")
58 (defparameter *hide-unmanaged-window* t
59 "Config(): Hide or not unmanaged windows when a child is deselected.")
61 ;;; CONFIG - Screen size
62 (defun get-fullscreen-size ()
63 "Return the size of root child (values rx ry rw rh)
64 You can tweak this to what you want"
65 (values -2 -2 (+ (xlib:screen-width *screen*) 2) (+ (xlib:screen-height *screen*) 2)))
66 ;;(values -1 -1 (xlib:screen-width *screen*) (xlib:screen-height *screen*)))
67 ;; (values -1 -1 1024 768))
68 ;; (values 100 100 800 600))
71 (defparameter *corner-size* 3
72 "Config(Corner group): The size of the corner square")
75 ;;; CONFIG: Corner actions - See in clfswm-corner.lisp for
76 ;;; allowed functions
77 (defparameter *corner-main-mode-left-button*
78 '((:top-left open-menu)
79 (:top-right present-virtual-keyboard)
80 (:bottom-right expose-windows-mode)
81 (:bottom-left nil))
82 "Config(Corner group): Actions on corners in the main mode with the left mouse button")
84 (defparameter *corner-main-mode-middle-button*
85 '((:top-left help-on-clfswm)
86 (:top-right ask-close/kill-current-window)
87 (:bottom-right nil)
88 (:bottom-left nil))
89 "Config(Corner group): Actions on corners in the main mode with the middle mouse button")
91 (defparameter *corner-main-mode-right-button*
92 '((:top-left present-clfswm-terminal)
93 (:top-right ask-close/kill-current-window)
94 (:bottom-right expose-all-windows-mode)
95 (:bottom-left nil))
96 "Config(Corner group): Actions on corners in the main mode with the right mouse button")
98 (defparameter *corner-second-mode-left-button*
99 '((:top-left nil)
100 (:top-right nil)
101 (:bottom-right expose-windows-mode)
102 (:bottom-left nil))
103 "Config(Corner group): Actions on corners in the second mode with the left mouse button")
105 (defparameter *corner-second-mode-middle-button*
106 '((:top-left help-on-clfswm)
107 (:top-right nil)
108 (:bottom-right nil)
109 (:bottom-left nil))
110 "Config(Corner group): Actions on corners in the second mode with the middle mouse button")
112 (defparameter *corner-second-mode-right-button*
113 '((:top-left nil)
114 (:top-right nil)
115 (:bottom-right expose-all-windows-mode)
116 (:bottom-left nil))
117 "Config(Corner group): Actions on corners in the second mode with the right mouse button")
120 (defparameter *virtual-keyboard-cmd* "xvkbd"
121 "Config(Corner group): The command to display the virtual keybaord
122 Here is an ~/.Xresources example for xvkbd:
123 xvkbd.windowGeometry: 300x100-0-0
124 xvkbd*Font: 6x12
125 xvkbd.modalKeytop: true
126 xvkbd.customization: -french
127 xvkbd.keypad: false
128 And make it always on top")
130 (defparameter *clfswm-terminal-name* "clfswm-terminal"
131 "Config(Corner group): The clfswm terminal name")
132 ;;(defparameter *clfswm-terminal-cmd* (format nil "xterm -T ~A -e /bin/bash --noprofile --norc" *clfswm-terminal-name*)
133 (defparameter *clfswm-terminal-cmd* (format nil "xterm -T ~A" *clfswm-terminal-name*)
134 "Config(Corner group): The clfswm terminal command.
135 This command must set the window title to *clfswm-terminal-name*")
140 ;;; Hook definitions
142 ;;; A hook is a function, a symbol or a list of functions with a rest
143 ;;; arguments.
145 ;;; This hooks are set in clfswm.lisp, you can overwrite them or extend
146 ;;; them with a hook list.
148 ;;; See clfswm.lisp for hooks examples.
150 (defparameter *init-hook* 'default-init-hook
151 "Config(Hook group): Init hook. This hook is run just after the first root frame is created")
153 (defparameter *default-nw-hook* 'default-frame-nw-hook
154 "Config(Hook group): Default action to do on newly created windows")
159 ;;; CONFIG
160 (defparameter *create-frame-on-root* nil
161 "Config(): Create frame on root.
162 Set this variable to true if you want to allow to create a new frame
163 on the root window in the main mode with the mouse")
166 ;;; CONFIG: Main mode colors
167 (defparameter *color-selected* "Red"
168 "Config(Main mode group): Color of selected window")
169 (defparameter *color-unselected* "Blue"
170 "Config(Main mode group): Color of unselected color")
171 (defparameter *color-maybe-selected* "Yellow"
172 "Config(Main mode group): Color of maybe selected windows")
175 ;;; CONFIG: Frame colors
176 (defparameter *frame-background* "Black"
177 "Config(Frame colors group): Frame background")
178 (defparameter *frame-foreground* "Green"
179 "Config(Frame colors group): Frame foreground")
180 (defparameter *frame-foreground-root* "Red"
181 "Config(Frame colors group): Frame foreground when the frame is the root frame")
182 (defparameter *frame-foreground-hidden* "Darkgreen"
183 "Config(Frame colors group): Frame foreground for hidden windows")
185 ;;; CONFIG: Default window size
186 (defparameter *default-window-width* 400
187 "Config(): Default window width")
188 (defparameter *default-window-height* 300
189 "Config(): Default window height")
191 ;;; CONFIG: Second mode colors and fonts
192 (defparameter *sm-border-color* "Green"
193 "Config(Second mode group): Second mode window border color")
194 (defparameter *sm-background-color* "Black"
195 "Config(Second mode group): Second mode window background color")
196 (defparameter *sm-foreground-color* "Red"
197 "Config(Second mode group): Second mode window foreground color")
198 (defparameter *sm-font-string* *default-font-string*
199 "Config(Second mode group): Second mode window font string")
200 (defparameter *sm-width* 300
201 "Config(Second mode group): Second mode window width")
202 (defparameter *sm-height* 25
203 "Config(Second mode group): Second mode window height")
209 ;;; CONFIG - Identify key colors
210 (defparameter *identify-font-string* *default-font-string*
211 "Config(Identify key group): Identify window font string")
212 (defparameter *identify-background* "black"
213 "Config(Identify key group): Identify window background color")
214 (defparameter *identify-foreground* "green"
215 "Config(Identify key group): Identify window foreground color")
216 (defparameter *identify-border* "red"
217 "Config(Identify key group): Identify window border color")
219 ;;; CONFIG - Query string colors
220 (defparameter *query-font-string* *default-font-string*
221 "Config(Query string group): Query string window font string")
222 (defparameter *query-background* "black"
223 "Config(Query string group): Query string window background color")
224 (defparameter *query-foreground* "green"
225 "Config(Query string group): Query string window foreground color")
226 (defparameter *query-border* "red"
227 "Config(Query string group): Query string window border color")
230 ;;; CONFIG - Info mode
231 (defparameter *info-background* "black"
232 "Config(Info mode group): Info window background color")
233 (defparameter *info-foreground* "green"
234 "Config(Info mode group): Info window foreground color")
235 (defparameter *info-border* "red"
236 "Config(Info mode group): Info window border color")
237 (defparameter *info-line-cursor* "white"
238 "Config(Info mode group): Info window line cursor color color")
239 (defparameter *info-selected-background* "blue"
240 "Config(Info mode group): Info selected item background color")
241 (defparameter *info-font-string* *default-font-string*
242 "Config(Info mode group): Info window font string")
244 (defparameter *info-click-to-select* t
245 "Config(Info mode group): If true, click on info window select item. Otherwise, click to drag the menu")
247 ;;; CONFIG - Circulate string colors
248 (defparameter *circulate-font-string* *default-font-string*
249 "Config(Circulate mode group): Circulate string window font string")
250 (defparameter *circulate-background* "black"
251 "Config(Circulate mode group): Circulate string window background color")
252 (defparameter *circulate-foreground* "green"
253 "Config(Circulate mode group): Circulate string window foreground color")
254 (defparameter *circulate-border* "red"
255 "Config(Circulate mode group): Circulate string window border color")
256 (defparameter *circulate-width* 400
257 "Config(Circulate mode group): Circulate mode window width")
258 (defparameter *circulate-height* 15
259 "Config(Circulate mode group): Circulate mode window height")
262 (defparameter *circulate-text-limite* 30
263 "Config(Circulate mode group): Maximum text limite in the circulate window")
267 ;;; CONFIG - Show key binding colors
268 (defparameter *info-color-title* "Magenta"
269 "Config(Info mode group): Colored info title color")
270 (defparameter *info-color-underline* "Yellow"
271 "Config(Info mode group): Colored info underline color")
272 (defparameter *info-color-first* "Cyan"
273 "Config(Info mode group): Colored info first color")
274 (defparameter *info-color-second* "lightblue"
275 "Config(Info mode group): Colored info second color")
278 ;;; CONFIG - Menu colors
279 ;;; Set *info-foreground* to change the default menu foreground
280 (defparameter *menu-color-submenu* "Cyan"
281 "Config(Menu group): Submenu color in menu")
282 (defparameter *menu-color-comment* "Yellow"
283 "Config(Menu group): Comment color in menu")
284 (defparameter *menu-color-key* "Magenta"
285 "Config(Menu group): Key color in menu")
286 (defparameter *menu-color-menu-key* (->color #xFF9AFF)
287 "Config(Menu group): Menu key color in menu")