src/clfswm-pack.lisp (move-frame-constrained, resize-frame-constrained): New function...
[clfswm.git] / src / config.lisp
blob82a9f60a1bd76d29f08b3bf05b3a628cb2815a6d
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 (defun-equal-wm-class equal-wm-class-rox-pinboard "ROX-Pinboard")
41 (defun-equal-wm-class equal-wm-class-xvkbd "xvkbd")
43 ;;; CONFIG - Never managed window list
44 (defconfig *never-managed-window-list*
45 (list (list 'equal-wm-class-rox-pinboard nil)
46 (list 'equal-wm-class-xvkbd 'raise-window)
47 (list 'equal-clfswm-terminal 'raise-and-focus-window))
48 nil "CLFSWM will never manage windows of this type.
49 A list of (list match-function handle-function)")
53 (defconfig *hide-unmanaged-window* t nil
54 "Hide or not unmanaged windows when a child is deselected.")
56 (defconfig *snap-size* 0.02 nil
57 "Snap size when move or resize frame is constrained")
60 ;;; CONFIG - Screen size
61 (defun get-fullscreen-size ()
62 "Return the size of root child (values rx ry rw rh)
63 You can tweak this to what you want"
64 (values (- *border-size*) (- *border-size*)
65 (xlib:screen-width *screen*)
66 (xlib:screen-height *screen*)))
67 ;;(values -1 -1 (xlib:screen-width *screen*) (xlib:screen-height *screen*)))
68 ;; (values -1 -1 1024 768))
69 ;; (values 100 100 800 600))
72 (defconfig *corner-size* 3 'Corner
73 "The size of the corner square")
75 ;;; CONFIG: Corner actions - See in clfswm-corner.lisp for
76 ;;; allowed functions
77 (defconfig *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 'Corner "Actions on corners in the main mode with the left mouse button")
84 (defconfig *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 'Corner "Actions on corners in the main mode with the middle mouse button")
91 (defconfig *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 'Corner "Actions on corners in the main mode with the right mouse button")
98 (defconfig *corner-second-mode-left-button*
99 '((:top-left nil)
100 (:top-right nil)
101 (:bottom-right expose-windows-mode)
102 (:bottom-left nil))
103 'Corner "Actions on corners in the second mode with the left mouse button")
105 (defconfig *corner-second-mode-middle-button*
106 '((:top-left help-on-clfswm)
107 (:top-right nil)
108 (:bottom-right nil)
109 (:bottom-left nil))
110 'Corner "Actions on corners in the second mode with the middle mouse button")
112 (defconfig *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 'Corner "Actions on corners in the second mode with the right mouse button")
120 (defconfig *virtual-keyboard-cmd* "xvkbd"
121 'Corner "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 (defconfig *clfswm-terminal-name* "clfswm-terminal"
131 'Corner "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 "urxvt -name ~A" *clfswm-terminal-name*)
134 (defconfig *clfswm-terminal-cmd* (format nil "xterm -T ~A" *clfswm-terminal-name*)
135 'Corner "The clfswm terminal command.
136 This command must set the window title to *clfswm-terminal-name*")
141 ;;; Hook definitions
143 ;;; A hook is a function, a symbol or a list of functions with a rest
144 ;;; arguments.
146 ;;; This hooks are set in clfswm.lisp, you can overwrite them or extend
147 ;;; them with a hook list.
149 ;;; See clfswm.lisp for hooks examples.
151 (defconfig *init-hook* '(default-init-hook display-hello-window)
152 'Hook "Init hook. This hook is run just after the first root frame is created")
154 (defconfig *close-hook* '(close-notify-window close-clfswm-terminal close-virtual-keyboard)
155 'Hook "Close hook. This hook is run just before closing the display")
157 (defconfig *default-nw-hook* 'default-frame-nw-hook
158 'Hook "Default action to do on newly created windows")
163 ;;; CONFIG
164 (defconfig *create-frame-on-root* nil
165 nil "Create frame on root.
166 Set this variable to true if you want to allow to create a new frame
167 on the root window in the main mode with the mouse")
170 ;;; CONFIG: Main mode colors
171 (defconfig *color-selected* "Red"
172 'Main-mode "Color of selected window")
173 (defconfig *color-unselected* "Blue"
174 'Main-mode "Color of unselected color")
175 (defconfig *color-maybe-selected* "Yellow"
176 'Main-mode "Color of maybe selected windows")
179 ;;; CONFIG: Frame colors
180 (defconfig *frame-background* "Black"
181 'Frame-colors "Frame background")
182 (defconfig *frame-foreground* "Green"
183 'Frame-colors "Frame foreground")
184 (defconfig *frame-foreground-root* "Red"
185 'Frame-colors "Frame foreground when the frame is the root frame")
186 (defconfig *frame-foreground-hidden* "Darkgreen"
187 'Frame-colors "Frame foreground for hidden windows")
189 ;;; CONFIG: Default window size
190 (defconfig *default-window-width* 400
191 nil "Default window width")
192 (defconfig *default-window-height* 300
193 nil "Default window height")
195 ;;; CONFIG: Second mode colors and fonts
196 (defconfig *sm-border-color* "Green"
197 'Second-mode "Second mode window border color")
198 (defconfig *sm-background-color* "Black"
199 'Second-mode "Second mode window background color")
200 (defconfig *sm-foreground-color* "Red"
201 'Second-mode "Second mode window foreground color")
202 (defconfig *sm-font-string* *default-font-string*
203 'Second-mode "Second mode window font string")
204 (defconfig *sm-width* 300
205 'Second-mode "Second mode window width")
206 (defconfig *sm-height* 25
207 'Second-mode "Second mode window height")
213 ;;; CONFIG - Identify key colors
214 (defconfig *identify-font-string* *default-font-string*
215 'Identify-key "Identify window font string")
216 (defconfig *identify-background* "black"
217 'Identify-key "Identify window background color")
218 (defconfig *identify-foreground* "green"
219 'Identify-key "Identify window foreground color")
220 (defconfig *identify-border* "red"
221 'Identify-key "Identify window border color")
223 ;;; CONFIG - Query string colors
224 (defconfig *query-font-string* *default-font-string*
225 'Query-string "Query string window font string")
226 (defconfig *query-background* "black"
227 'Query-string "Query string window background color")
228 (defconfig *query-message-color* "yellow"
229 'Query-string "Query string window message color")
230 (defconfig *query-foreground* "green"
231 'Query-string "Query string window foreground color")
232 (defconfig *query-cursor-color* "white"
233 'Query-string "Query string window foreground cursor color")
234 (defconfig *query-parent-color* "blue"
235 'Query-string "Query string window parenthesis color")
236 (defconfig *query-parent-error-color* "red"
237 'Query-string "Query string window parenthesis color when no match")
238 (defconfig *query-border* "red"
239 'Query-string "Query string window border color")
242 ;;; CONFIG - Info mode
243 (defconfig *info-background* "black"
244 'Info-mode "Info window background color")
245 (defconfig *info-foreground* "green"
246 'Info-mode "Info window foreground color")
247 (defconfig *info-border* "red"
248 'Info-mode "Info window border color")
249 (defconfig *info-line-cursor* "white"
250 'Info-mode "Info window line cursor color color")
251 (defconfig *info-selected-background* "blue"
252 'Info-mode "Info selected item background color")
253 (defconfig *info-font-string* *default-font-string*
254 'Info-mode "Info window font string")
256 (defconfig *info-click-to-select* t
257 'Info-mode "If true, click on info window select item. Otherwise, click to drag the menu")
259 ;;; CONFIG - Circulate string colors
260 (defconfig *circulate-font-string* *default-font-string*
261 'Circulate-mode "Circulate string window font string")
262 (defconfig *circulate-background* "black"
263 'Circulate-mode "Circulate string window background color")
264 (defconfig *circulate-foreground* "green"
265 'Circulate-mode "Circulate string window foreground color")
266 (defconfig *circulate-border* "red"
267 'Circulate-mode "Circulate string window border color")
268 (defconfig *circulate-width* 400
269 'Circulate-mode "Circulate mode window width")
270 (defconfig *circulate-height* 15
271 'Circulate-mode "Circulate mode window height")
274 (defconfig *circulate-text-limite* 30
275 'Circulate-mode "Maximum text limite in the circulate window")
278 ;;; CONFIG - Expose string colors
279 (defconfig *expose-font-string* *default-font-string*
280 'Expose-mode "Expose string window font string")
281 (defconfig *expose-background* "black"
282 'Expose-mode "Expose string window background color")
283 (defconfig *expose-foreground* "green"
284 'Expose-mode "Expose string window foreground color")
285 (defconfig *expose-border* "red"
286 'Expose-mode "Expose string window border color")
287 (defconfig *expose-valid-on-key* t
288 'Expose-mode "Valid expose mode when an accel key is pressed")
289 (defconfig *expose-show-window-title* t
290 'Expose-mode "Show the window title on accel window")
294 ;;; CONFIG - Show key binding colors
295 (defconfig *info-color-title* "Magenta"
296 'Info-mode "Colored info title color")
297 (defconfig *info-color-underline* "Yellow"
298 'Info-mode "Colored info underline color")
299 (defconfig *info-color-first* "Cyan"
300 'Info-mode "Colored info first color")
301 (defconfig *info-color-second* "lightblue"
302 'Info-mode "Colored info second color")
305 ;;; CONFIG - Menu colors
306 ;;; Set *info-foreground* to change the default menu foreground
307 (defconfig *menu-color-submenu* "Cyan"
308 'Menu "Submenu color in menu")
309 (defconfig *menu-color-comment* "Yellow"
310 'Menu "Comment color in menu")
311 (defconfig *menu-color-key* "Magenta"
312 'Menu "Key color in menu")
313 (defconfig *menu-color-menu-key* (->color #xFF9AFF)
314 'Menu "Menu key color in menu")
317 ;;; CONFIG - Notify window string colors
318 (defconfig *notify-window-font-string* *default-font-string*
319 'Notify-Window "Notify window font string")
320 (defconfig *notify-window-background* "black"
321 'Notify-Window "Notify Window background color")
322 (defconfig *notify-window-foreground* "green"
323 'Notify-Window "Notify Window foreground color")
324 (defconfig *notify-window-border* "red"
325 'Notify-Window "Notify Window border color")
326 (defconfig *notify-window-delay* 10
327 'Notify-Window "Notify Window display delay")