1; Aquiline/theme.jl 2;; Original Aquaesque theme: 3;; Copyright (C) 2000 Henrik Magnusson <henma887@student.liu.se> 4;; Aquiline theme: 5;; Modifications (C) 2001 Matt Chisholm <matt@theory.org> 6 7(let* 8 ;; Update window title pixel length 9 ((title-width 10 (lambda (w) 11 (let 12 ((w-width (car (window-dimensions w)))) 13 (max 0 (min (- w-width 100) (text-width (window-name w))))))) 14 15 (font (get-font "-*-lucida-medium-r-normal-*-*-100-*-*-p-*-iso8859-1")) 16 17 (font-colors (list "white" "black")) 18 19 (top-left-images (list (make-image "top_left_inactive.png") 20 (make-image "top_left.png"))) 21 22 (top-left-shaded-images (list (make-image "top_left_inactive_shaded.png") 23 (make-image "top_left_shaded.png"))) 24 25 (top-title-images (list (make-image "top_title_inactive.png") 26 (make-image "top_title.png"))) 27 28 (top-gradient-images (list (make-image "top_gradient_inactive.png") 29 (make-image "top_gradient.png"))) 30 31 (top-right-images (list (make-image "top_right_inactive.png") 32 (make-image "top_right.png"))) 33 34 (top-right-shaded-images (list (make-image "top_right_inactive_shaded.png") 35 (make-image "top_right_shaded.png"))) 36 37 (close-images (list (make-image "close_normal.png") 38 (make-image "close_active.png") 39 (make-image "close_high.png") 40 (make-image "close_pressed.png"))) 41 42 (maximize-images (list (make-image "max_normal.png") 43 (make-image "max_active.png") 44 (make-image "max_high.png") 45 (make-image "max_pressed.png"))) 46 47 (iconify-images (list (make-image "min_normal.png") 48 (make-image "min_active.png") 49 (make-image "min_high.png") 50 (make-image "min_pressed.png"))) 51 52 (border-images (make-image "bl.png")) 53 54 ;; Frame definitions: 55 (frame `( 56 ;; top left corner 57 ((background . ,top-left-images) 58 (left-edge . -2) 59 (top-edge . -23) 60 (class . top-left-corner)) 61 62 ;; behind title 63 ((background . ,top-gradient-images) 64 ;; top-title-images 65 (foreground . ,font-colors) 66 (text . ,window-name) 67 (x-justify . 4) 68 (y-justify . 6) 69 (top-edge . -23) 70 (left-edge . 5) 71 (right-edge . 35) ;; comment out 72 (class . title)) 73 74 ;; iconify button 75 ((background . ,iconify-images) 76 (right-edge . 37) 77 (top-edge . -23) 78 (class . iconify-button)) 79 80 ;; maximize button 81 ((background . ,maximize-images) 82 (right-edge . 20) 83 (top-edge . -23) 84 (class . maximize-button)) 85 86 ;; delete button 87 ((background . ,close-images) 88 (right-edge . 2) 89 (top-edge . -23) 90 (class . close-button)) 91 92 ;; top-right corner 93 ((background . ,top-right-images) 94 (right-edge . -2) 95 (top-edge . -23) 96 (class . top-right-corner)) 97 98 ;; left border 99 ((background . ,border-images) 100 (left-edge . -2) 101 (top-edge . 0) 102 (bottom-edge . 0) 103 (class . left-border)) 104 105 ;; right border 106 ((background . ,border-images) 107 (right-edge . -2) 108 (top-edge . 0) 109 (bottom-edge . 0) 110 (class . right-border)) 111 112 ;; bottom border 113 ((background . ,border-images) 114 (left-edge . 0) 115 (right-edge . 0) 116 (bottom-edge . -2) 117 (class . bottom-border)) 118 119 ;; bottom-left corner 120 ((background . ,border-images) 121 (left-edge . -1) 122 (bottom-edge . -1) 123 (class . bottom-left-corner)) 124 125 ;; bottom-right corner 126 ((background . ,border-images) 127 (right-edge . -1) 128 (bottom-edge . -1) 129 (class . bottom-right-corner)))) 130 131 (shaded-frame `( 132 ;; top left corner 133 ((background . ,top-left-shaded-images) 134 (left-edge . -2) 135 (top-edge . -23) 136 (class . top-left-corner)) 137 138 ;; behind title 139 ((background . ,top-title-images) 140 (foreground . ,font-colors) 141 (text . ,window-name) 142 (x-justify . 4) 143 (y-justify . 6) 144 (top-edge . -23) 145 (left-edge . 5) 146 (width . ,(lambda (w) (+ (title-width w) 13))) 147 (class . title)) 148 149 ;; gradient 150 ((background . ,top-gradient-images) 151 (top-edge . -23) 152 (left-edge . ,(lambda (w) (+ (title-width w) 13))) 153 (right-edge . 35) 154 (class . title)) 155 156 ;; iconify button 157 ((background . ,iconify-images) 158 (right-edge . 37) 159 (top-edge . -23) 160 (class . iconify-button)) 161 162 ;; maximize button 163 ((background . ,maximize-images) 164 (right-edge . 20) 165 (top-edge . -23) 166 (class . maximize-button)) 167 168 ;; delete button 169 ((background . ,close-images) 170 (right-edge . 2) 171 (top-edge . -23) 172 (class . close-button)) 173 174 ;; top-right corner 175 ((background . ,top-right-shaded-images) 176 (right-edge . -2) 177 (top-edge . -23) 178 (class . top-right-corner)))) 179 180 (transient-frame `( 181 ;; top left corner 182 ((background . ,top-left-images) 183 (left-edge . -2) 184 (top-edge . -23) 185 (class . top-left-corner)) 186 187 ;; behind title 188 ((background . ,top-gradient-images) 189 ;; top-title-images 190 (foreground . ,font-colors) 191 (text . ,window-name) 192 (x-justify . 4) 193 (y-justify . 6) 194 (top-edge . -23) 195 (left-edge . 5) 196 (right-edge . 35) ;; comment out 197 (class . title)) 198 199 ;; iconify button 200 ((background . ,iconify-images) 201 (right-edge . 37) 202 (top-edge . -23) 203 (class . iconify-button)) 204 205 ;; maximize button 206 ((background . ,maximize-images) 207 (right-edge . 20) 208 (top-edge . -23) 209 (class . maximize-button)) 210 211 ;; delete button 212 ((background . ,close-images) 213 (right-edge . 2) 214 (top-edge . -23) 215 (class . close-button)) 216 217 ;; top-right corner 218 ((background . ,top-right-images) 219 (right-edge . -2) 220 (top-edge . -23) 221 (class . top-right-corner)) 222 223 ;; left border 224 ((background . ,border-images) 225 (left-edge . -2) 226 (top-edge . 0) 227 (bottom-edge . 0) 228 (class . left-border)) 229 230 ;; right border 231 ((background . ,border-images) 232 (right-edge . -2) 233 (top-edge . 0) 234 (bottom-edge . 0) 235 (class . right-border)) 236 237 ;; bottom border 238 ((background . ,border-images) 239 (left-edge . 0) 240 (right-edge . 0) 241 (bottom-edge . -2) 242 (class . bottom-border)) 243 244 ;; bottom-left corner 245 ((background . ,border-images) 246 (left-edge . -1) 247 (bottom-edge . -1) 248 (class . bottom-left-corner)) 249 250 ;; bottom-right corner 251 ((background . ,border-images) 252 (right-edge . -1) 253 (bottom-edge . -1) 254 (class . bottom-right-corner)))) 255 256 (shaded-transient-frame `( 257 ;; top left corner 258 ((background . ,top-left-shaded-images) 259 (left-edge . -2) 260 (top-edge . -23) 261 (class . top-left-corner)) 262 263 ;; behind title 264 ((background . ,top-title-images) 265 (foreground . ,font-colors) 266 (text . ,window-name) 267 (x-justify . 4) 268 (y-justify . 6) 269 (top-edge . -23) 270 (left-edge . 5) 271 (width . ,(lambda (w) (+ (title-width w) 13))) 272 (class . title)) 273 274 ;; gradient 275 ((background . ,top-gradient-images) 276 (top-edge . -23) 277 (left-edge . ,(lambda (w) (+ (title-width w) 13))) 278 (right-edge . 35) 279 (class . title)) 280 281 ;; maximize button 282 ((background . ,maximize-images) 283 (right-edge . 37) 284 (top-edge . -23) 285 (class . maximize-button)) 286 287 ;; maximize button 288 ((background . ,maximize-images) 289 (right-edge . 20) 290 (top-edge . -23) 291 (class . maximize-button)) 292 293 ;; delete button 294 ((background . ,close-images) 295 (right-edge . 2) 296 (top-edge . -23) 297 (class . close-button)) 298 299 ;; top-right corner 300 ((background . ,top-right-shaded-images) 301 (right-edge . -2) 302 (top-edge . -23) 303 (class . top-right-corner))))) 304 305 (add-frame-style 'Aquiline 306 (lambda (w type) 307 (cond ((eq type 'shaded) 308 shaded-frame) 309 ((eq type 'transient) 310 transient-frame) 311 ((eq type 'shaded-transient) 312 shaded-transient-frame) 313 ((eq type 'unframed) 314 nil-frame) 315 (t 316 frame)))) 317 318 (call-after-property-changed 319 'WM_NAME (lambda () 320 (rebuild-frames-with-style 'Aquiline))))