1 ;;; --------------------------------------------------------------------------
2 ;;; CLFSWM - FullScreen Window Manager
4 ;;; --------------------------------------------------------------------------
5 ;;; Documentation: Configuration file
7 ;;; Change this file to your own needs or update some of this variables in
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 ;;; --------------------------------------------------------------------------
13 ;;; (C) 2011 Philippe Brochard <hocwp@free.fr>
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.
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.
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.
29 ;;; --------------------------------------------------------------------------
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
* 20 nil
67 "Snap size (in pixels) 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 ;;; CONFIG - Screen size
77 (defun get-fullscreen-size ()
78 "Return the size of root child (values rx ry rw rh)
79 You can tweak this to what you want"
80 (values (- *border-size
*) (- *border-size
*)
81 (xlib:screen-width
*screen
*)
82 (xlib:screen-height
*screen
*)))
83 ;;(values -1 -1 (xlib:screen-width *screen*) (xlib:screen-height *screen*)))
84 ;; (values -1 -1 1024 768))
85 ;; (values 100 100 800 600))
88 (defconfig *corner-size
* 3 'Corner
89 "The size of the corner square")
91 ;;; CONFIG: Corner actions - See in clfswm-corner.lisp for
93 (defconfig *corner-main-mode-left-button
*
94 '((:top-left open-menu
)
95 (:top-right present-virtual-keyboard
)
96 (:bottom-right expose-windows-mode
)
98 'Corner
"Actions on corners in the main mode with the left mouse button")
100 (defconfig *corner-main-mode-middle-button
*
101 '((:top-left help-on-clfswm
)
102 (:top-right ask-close
/kill-current-window
)
105 'Corner
"Actions on corners in the main mode with the middle mouse button")
107 (defconfig *corner-main-mode-right-button
*
108 '((:top-left present-clfswm-terminal
)
109 (:top-right ask-close
/kill-current-window
)
110 (:bottom-right expose-all-windows-mode
)
112 'Corner
"Actions on corners in the main mode with the right mouse button")
114 (defconfig *corner-second-mode-left-button
*
117 (:bottom-right expose-windows-mode
)
119 'Corner
"Actions on corners in the second mode with the left mouse button")
121 (defconfig *corner-second-mode-middle-button
*
122 '((:top-left help-on-clfswm
)
126 'Corner
"Actions on corners in the second mode with the middle mouse button")
128 (defconfig *corner-second-mode-right-button
*
131 (:bottom-right expose-all-windows-mode
)
133 'Corner
"Actions on corners in the second mode with the right mouse button")
136 (defconfig *virtual-keyboard-cmd
* "xvkbd"
137 'Corner
"The command to display the virtual keybaord
138 Here is an ~/.Xresources example for xvkbd:
139 xvkbd.windowGeometry: 300x100-0-0
141 xvkbd.modalKeytop: true
142 xvkbd.customization: -french
144 And make it always on top")
146 (defconfig *clfswm-terminal-name
* "clfswm-terminal"
147 'Corner
"The clfswm terminal name")
148 ;;(defparameter *clfswm-terminal-cmd* (format nil "xterm -T ~A -e /bin/bash --noprofile --norc" *clfswm-terminal-name*)
149 ;;(defparameter *clfswm-terminal-cmd* (format nil "urxvt -name ~A" *clfswm-terminal-name*)
150 (defconfig *clfswm-terminal-cmd
* (format nil
"xterm -T ~A" *clfswm-terminal-name
*)
151 'Corner
"The clfswm terminal command.
152 This command must set the window title to *clfswm-terminal-name*")
154 (defconfig *corner-error-message-color
* "red"
155 'Corner
"Error message color")
156 (defconfig *corner-error-message-delay
* 5
157 'Corner
"Time to display the error message on commad error")
158 (defconfig *corner-command-try-delay
* 0.2
159 'Corner
"Time to wait before checking window in query tree")
160 (defconfig *corner-command-try-number
* 10
161 'Corner
"Number of try to wait the window in query tree")
166 ;;; A hook is a function, a symbol or a list of functions with a rest
169 ;;; This hooks are set in clfswm.lisp, you can overwrite them or extend
170 ;;; them with a hook list.
172 ;;; See clfswm.lisp for hooks examples.
174 (defconfig *init-hook
* '(default-init-hook place-frames-from-xrandr display-hello-window
)
175 'Hook
"Init hook. This hook is run just after the first root frame is created")
177 (defconfig *close-hook
* '(close-notify-window close-clfswm-terminal close-virtual-keyboard
)
178 'Hook
"Close hook. This hook is run just before closing the display")
180 (defconfig *default-nw-hook
* 'default-frame-nw-hook
181 'Hook
"Default action to do on newly created windows")
187 (defconfig *create-frame-on-root
* nil
188 nil
"Create frame on root.
189 Set this variable to true if you want to allow to create a new frame
190 on the root window in the main mode with the mouse")
193 ;;; CONFIG: Main mode colors
194 (defconfig *color-selected
* "Red"
195 'Main-mode
"Color of selected window")
196 (defconfig *color-unselected
* "Blue"
197 'Main-mode
"Color of unselected color")
198 (defconfig *color-maybe-selected
* "Yellow"
199 'Main-mode
"Color of maybe selected windows")
202 ;;; CONFIG: Frame colors
203 (defconfig *frame-background
* "Black"
204 'Frame-colors
"Frame background")
205 (defconfig *frame-foreground
* "Green"
206 'Frame-colors
"Frame foreground")
207 (defconfig *frame-foreground-root
* "Red"
208 'Frame-colors
"Frame foreground when the frame is the root frame")
209 (defconfig *frame-foreground-hidden
* "Darkgreen"
210 'Frame-colors
"Frame foreground for hidden windows")
211 (defconfig *frame-transparency
* *default-transparency
*
212 'Frame-colors
"Frame background transparency")
214 ;;; CONFIG: Default window size
215 (defconfig *default-window-width
* 400
216 nil
"Default window width")
217 (defconfig *default-window-height
* 300
218 nil
"Default window height")
220 ;;; CONFIG: Second mode colors and fonts
221 (defconfig *sm-border-color
* "Green"
222 'Second-mode
"Second mode window border color")
223 (defconfig *sm-background-color
* "Black"
224 'Second-mode
"Second mode window background color")
225 (defconfig *sm-foreground-color
* "Red"
226 'Second-mode
"Second mode window foreground color")
227 (defconfig *sm-font-string
* *default-font-string
*
228 'Second-mode
"Second mode window font string")
229 (defconfig *sm-width
* 300
230 'Second-mode
"Second mode window width")
231 (defconfig *sm-height
* 25
232 'Second-mode
"Second mode window height")
233 (defconfig *sm-transparency
* *default-transparency
*
234 'Second-mode
"Second mode background transparency")
239 ;;; CONFIG - Identify key colors
240 (defconfig *identify-font-string
* *default-font-string
*
241 'Identify-key
"Identify window font string")
242 (defconfig *identify-background
* "black"
243 'Identify-key
"Identify window background color")
244 (defconfig *identify-foreground
* "green"
245 'Identify-key
"Identify window foreground color")
246 (defconfig *identify-border
* "red"
247 'Identify-key
"Identify window border color")
248 (defconfig *identify-transparency
* *default-transparency
*
249 'Identify-key
"Identify window background transparency")
251 ;;; CONFIG - Query string colors
252 (defconfig *query-font-string
* *default-font-string
*
253 'Query-string
"Query string window font string")
254 (defconfig *query-background
* "black"
255 'Query-string
"Query string window background color")
256 (defconfig *query-message-color
* "yellow"
257 'Query-string
"Query string window message color")
258 (defconfig *query-foreground
* "green"
259 'Query-string
"Query string window foreground color")
260 (defconfig *query-cursor-color
* "white"
261 'Query-string
"Query string window foreground cursor color")
262 (defconfig *query-parent-color
* "blue"
263 'Query-string
"Query string window parenthesis color")
264 (defconfig *query-parent-error-color
* "red"
265 'Query-string
"Query string window parenthesis color when no match")
266 (defconfig *query-border
* "red"
267 'Query-string
"Query string window border color")
268 (defconfig *query-transparency
* *default-transparency
*
269 'Query-string
"Query string window background transparency")
272 ;;; CONFIG - Info mode
273 (defconfig *info-background
* "black"
274 'Info-mode
"Info window background color")
275 (defconfig *info-foreground
* "green"
276 'Info-mode
"Info window foreground color")
277 (defconfig *info-border
* "red"
278 'Info-mode
"Info window border color")
279 (defconfig *info-line-cursor
* "white"
280 'Info-mode
"Info window line cursor color color")
281 (defconfig *info-selected-background
* "blue"
282 'Info-mode
"Info selected item background color")
283 (defconfig *info-font-string
* *default-font-string
*
284 'Info-mode
"Info window font string")
285 (defconfig *info-transparency
* *default-transparency
*
286 'Info-mode
"Info window background transparency")
288 (defconfig *info-click-to-select
* t
289 'Info-mode
"If true, click on info window select item. Otherwise, click to drag the menu")
291 ;;; CONFIG - Circulate string colors
292 (defconfig *circulate-font-string
* *default-font-string
*
293 'Circulate-mode
"Circulate string window font string")
294 (defconfig *circulate-background
* "black"
295 'Circulate-mode
"Circulate string window background color")
296 (defconfig *circulate-foreground
* "green"
297 'Circulate-mode
"Circulate string window foreground color")
298 (defconfig *circulate-border
* "red"
299 'Circulate-mode
"Circulate string window border color")
300 (defconfig *circulate-width
* 400
301 'Circulate-mode
"Circulate mode window width")
302 (defconfig *circulate-height
* 15
303 'Circulate-mode
"Circulate mode window height")
304 (defconfig *circulate-transparency
* *default-transparency
*
305 'Circulate-mode
"Circulate window background transparency")
308 (defconfig *circulate-text-limite
* 30
309 'Circulate-mode
"Maximum text limite in the circulate window")
312 ;;; CONFIG - Expose string colors
313 (defconfig *expose-font-string
* *default-font-string
*
314 'Expose-mode
"Expose string window font string")
315 (defconfig *expose-background
* "black"
316 'Expose-mode
"Expose string window background color")
317 (defconfig *expose-foreground
* "green"
318 'Expose-mode
"Expose string window foreground color")
319 (defconfig *expose-border
* "red"
320 'Expose-mode
"Expose string window border color")
321 (defconfig *expose-valid-on-key
* t
322 'Expose-mode
"Valid expose mode when an accel key is pressed")
323 (defconfig *expose-show-window-title
* t
324 'Expose-mode
"Show the window title on accel window")
325 (defconfig *expose-transparency
* *default-transparency
*
326 'Expose-mode
"Expose string window background transparency")
330 ;;; CONFIG - Show key binding colors
331 (defconfig *info-color-title
* "Magenta"
332 'Info-mode
"Colored info title color")
333 (defconfig *info-color-underline
* "Yellow"
334 'Info-mode
"Colored info underline color")
335 (defconfig *info-color-first
* "Cyan"
336 'Info-mode
"Colored info first color")
337 (defconfig *info-color-second
* "lightblue"
338 'Info-mode
"Colored info second color")
341 ;;; CONFIG - Menu colors
342 ;;; Set *info-foreground* to change the default menu foreground
343 (defconfig *menu-color-submenu
* "Cyan"
344 'Menu
"Submenu color in menu")
345 (defconfig *menu-color-comment
* "Yellow"
346 'Menu
"Comment color in menu")
347 (defconfig *menu-color-key
* "Magenta"
348 'Menu
"Key color in menu")
349 (defconfig *menu-color-menu-key
* (->color
#xFF9AFF
)
350 'Menu
"Menu key color in menu")
353 ;;; CONFIG - Notify window string colors
354 (defconfig *notify-window-font-string
* *default-font-string
*
355 'Notify-Window
"Notify window font string")
356 (defconfig *notify-window-background
* "black"
357 'Notify-Window
"Notify Window background color")
358 (defconfig *notify-window-foreground
* "green"
359 'Notify-Window
"Notify Window foreground color")
360 (defconfig *notify-window-border
* "red"
361 'Notify-Window
"Notify Window border color")
362 (defconfig *notify-window-delay
* 10
363 'Notify-Window
"Notify Window display delay")
364 (defconfig *notify-window-transparency
* *default-transparency
*
365 'Notify-window
"Notify window background transparency")