src/clfswm-keys.lisp (define-ungrab/grab): Use all values returned by xlib:keysym...
[clfswm.git] / src / config.lisp
blobff378e3fba37fddb025a1915b474bfaa5773d36a
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 ;;; CONFIG - Screen size
59 (defun get-fullscreen-size ()
60 "Return the size of root child (values rx ry rw rh)
61 You can tweak this to what you want"
62 (values -2 -2 (+ (xlib:screen-width *screen*) 2) (+ (xlib:screen-height *screen*) 2)))
63 ;;(values -1 -1 (xlib:screen-width *screen*) (xlib:screen-height *screen*)))
64 ;; (values -1 -1 1024 768))
65 ;; (values 100 100 800 600))
68 (defparameter *corner-size* 3
69 "Config(Corner group): The size of the corner square")
72 ;;; CONFIG: Corner actions - See in clfswm-corner.lisp for
73 ;;; allowed functions
74 (defparameter *corner-main-mode-left-button*
75 '((:top-left open-menu)
76 (:top-right present-virtual-keyboard)
77 (:bottom-right present-windows)
78 (:bottom-left nil))
79 "Config(Corner group): Actions on corners in the main mode with the left mouse button")
81 (defparameter *corner-main-mode-middle-button*
82 '((:top-left help-on-clfswm)
83 (:top-right ask-close/kill-current-window)
84 (:bottom-right nil)
85 (:bottom-left nil))
86 "Config(Corner group): Actions on corners in the main mode with the middle mouse button")
88 (defparameter *corner-main-mode-right-button*
89 '((:top-left present-clfswm-terminal)
90 (:top-right ask-close/kill-current-window)
91 (:bottom-right present-all-windows)
92 (:bottom-left nil))
93 "Config(Corner group): Actions on corners in the main mode with the right mouse button")
95 (defparameter *corner-second-mode-left-button*
96 '((:top-left nil)
97 (:top-right nil)
98 (:bottom-right present-windows)
99 (:bottom-left nil))
100 "Config(Corner group): Actions on corners in the second mode with the left mouse button")
102 (defparameter *corner-second-mode-middle-button*
103 '((:top-left help-on-clfswm)
104 (:top-right nil)
105 (:bottom-right nil)
106 (:bottom-left nil))
107 "Config(Corner group): Actions on corners in the second mode with the middle mouse button")
109 (defparameter *corner-second-mode-right-button*
110 '((:top-left nil)
111 (:top-right nil)
112 (:bottom-right present-all-windows)
113 (:bottom-left nil))
114 "Config(Corner group): Actions on corners in the second mode with the right mouse button")
117 (defparameter *virtual-keyboard-cmd* "xvkbd"
118 "Config(Corner group): The command to display the virtual keybaord
119 Here is an ~/.Xresources example for xvkbd:
120 xvkbd.windowGeometry: 300x100-0-0
121 xvkbd*Font: 6x12
122 xvkbd.modalKeytop: true
123 xvkbd.customization: -french
124 xvkbd.keypad: false
125 And make it always on top")
126 (defparameter *virtual-keyboard-kill-cmd* "pkill xvkbd"
127 "Config(Corner group): The command to stop the virtual keyboard")
129 (defparameter *clfswm-terminal-name* "clfswm-terminal"
130 "Config(Corner group): The clfswm terminal name")
131 (defparameter *clfswm-terminal-cmd* (format nil "xterm -T ~A" *clfswm-terminal-name*)
132 "Config(Corner group): The clfswm terminal command.
133 This command must set the window title to *clfswm-terminal-name*")
138 ;;; Hook definitions
140 ;;; A hook is a function, a symbol or a list of functions with a rest
141 ;;; arguments.
143 ;;; This hooks are set in clfswm.lisp, you can overwrite them or extend
144 ;;; them with a hook list.
146 ;;; See clfswm.lisp for hooks examples.
148 (defparameter *init-hook* 'default-init-hook
149 "Config(Hook group): Init hook. This hook is run just after the first root frame is created")
151 (defparameter *default-nw-hook* 'default-frame-nw-hook
152 "Config(Hook group): Default action to do on newly created windows")
157 ;;; CONFIG
158 (defparameter *create-frame-on-root* nil
159 "Config(): Create frame on root.
160 Set this variable to true if you want to allow to create a new frame
161 on the root window in the main mode with the mouse")
164 ;;; CONFIG: Main mode colors
165 (defparameter *color-selected* "Red"
166 "Config(Main mode group): Color of selected window")
167 (defparameter *color-unselected* "Blue"
168 "Config(Main mode group): Color of unselected color")
169 (defparameter *color-maybe-selected* "Yellow"
170 "Config(Main mode group): Color of maybe selected windows")
173 ;;; CONFIG: Frame colors
174 (defparameter *frame-background* "Black"
175 "Config(Frame colors group): Frame background")
176 (defparameter *frame-foreground* "Green"
177 "Config(Frame colors group): Frame foreground")
178 (defparameter *frame-foreground-root* "Red"
179 "Config(Frame colors group): Frame foreground when the frame is the root frame")
180 (defparameter *frame-foreground-hidden* "Darkgreen"
181 "Config(Frame colors group): Frame foreground for hidden windows")
183 ;;; CONFIG: Default window size
184 (defparameter *default-window-width* 400
185 "Config(): Default window width")
186 (defparameter *default-window-height* 300
187 "Config(): Default window height")
189 ;;; CONFIG: Second mode colors and fonts
190 (defparameter *sm-border-color* "Green"
191 "Config(Second mode group): Second mode window border color")
192 (defparameter *sm-background-color* "Black"
193 "Config(Second mode group): Second mode window background color")
194 (defparameter *sm-foreground-color* "Red"
195 "Config(Second mode group): Second mode window foreground color")
196 (defparameter *sm-font-string* *default-font-string*
197 "Config(Second mode group): Second mode window font string")
198 (defparameter *sm-width* 300
199 "Config(Second mode group): Second mode window width")
200 (defparameter *sm-height* 25
201 "Config(Second mode group): Second mode window height")
207 ;;; CONFIG - Identify key colors
208 (defparameter *identify-font-string* *default-font-string*
209 "Config(Identify key group): Identify window font string")
210 (defparameter *identify-background* "black"
211 "Config(Identify key group): Identify window background color")
212 (defparameter *identify-foreground* "green"
213 "Config(Identify key group): Identify window foreground color")
214 (defparameter *identify-border* "red"
215 "Config(Identify key group): Identify window border color")
217 ;;; CONFIG - Query string colors
218 (defparameter *query-font-string* *default-font-string*
219 "Config(Query string group): Query string window font string")
220 (defparameter *query-background* "black"
221 "Config(Query string group): Query string window background color")
222 (defparameter *query-foreground* "green"
223 "Config(Query string group): Query string window foreground color")
224 (defparameter *query-border* "red"
225 "Config(Query string group): Query string window border color")
228 ;;; CONFIG - Info mode
229 (defparameter *info-background* "black"
230 "Config(Info mode group): Info window background color")
231 (defparameter *info-foreground* "green"
232 "Config(Info mode group): Info window foreground color")
233 (defparameter *info-border* "red"
234 "Config(Info mode group): Info window border color")
235 (defparameter *info-line-cursor* "white"
236 "Config(Info mode group): Info window line cursor color color")
237 (defparameter *info-selected-background* "blue"
238 "Config(Info mode group): Info selected item background color")
239 (defparameter *info-font-string* *default-font-string*
240 "Config(Info mode group): Info window font string")
242 (defparameter *info-click-to-select* t
243 "Config(Info mode group): If true, click on info window select item. Otherwise, click to drag the menu")
245 ;;; CONFIG - Circulate string colors
246 (defparameter *circulate-font-string* *default-font-string*
247 "Config(Circulate mode group): Circulate string window font string")
248 (defparameter *circulate-background* "black"
249 "Config(Circulate mode group): Circulate string window background color")
250 (defparameter *circulate-foreground* "green"
251 "Config(Circulate mode group): Circulate string window foreground color")
252 (defparameter *circulate-border* "red"
253 "Config(Circulate mode group): Circulate string window border color")
254 (defparameter *circulate-width* 400
255 "Config(Circulate mode group): Circulate mode window width")
256 (defparameter *circulate-height* 15
257 "Config(Circulate mode group): Circulate mode window height")
260 (defparameter *circulate-text-limite* 30
261 "Config(Circulate mode group): Maximum text limite in the circulate window")
265 ;;; CONFIG - Show key binding colors
266 (defparameter *info-color-title* "Magenta"
267 "Config(Info mode group): Colored info title color")
268 (defparameter *info-color-underline* "Yellow"
269 "Config(Info mode group): Colored info underline color")
270 (defparameter *info-color-first* "Cyan"
271 "Config(Info mode group): Colored info first color")
272 (defparameter *info-color-second* "lightblue"
273 "Config(Info mode group): Colored info second color")
276 ;;; CONFIG - Menu colors
277 ;;; Set *info-foreground* to change the default menu foreground
278 (defparameter *menu-color-submenu* "Cyan"
279 "Config(Menu group): Submenu color in menu")
280 (defparameter *menu-color-comment* "Yellow"
281 "Config(Menu group): Comment color in menu")
282 (defparameter *menu-color-key* "Magenta"
283 "Config(Menu group): Key color in menu")
284 (defparameter *menu-color-menu-key* (->color #xFF9AFF)
285 "Config(Menu group): Menu key color in menu")