366 |
"Set background mode as appropriate for the default rxvt colors." |
"Set background mode as appropriate for the default rxvt colors." |
367 |
(let ((fgbg (getenv "COLORFGBG")) |
(let ((fgbg (getenv "COLORFGBG")) |
368 |
bg rgb) |
bg rgb) |
369 |
(setq frame-background-mode 'light) ; default |
(setq default-frame-background-mode 'light) |
370 |
(when (and fgbg |
(when (and fgbg |
371 |
(string-match ".*;\\([0-9][0-9]?\\)\\'" fgbg)) |
(string-match ".*;\\([0-9][0-9]?\\)\\'" fgbg)) |
372 |
(setq bg (string-to-number (substring fgbg (match-beginning 1)))) |
(setq bg (string-to-number (substring fgbg (match-beginning 1)))) |
379 |
;; The following line assumes that white is the 15th |
;; The following line assumes that white is the 15th |
380 |
;; color in xterm-standard-colors. |
;; color in xterm-standard-colors. |
381 |
(* (apply '+ (car (cddr (nth 15 xterm-standard-colors)))) 0.6)) |
(* (apply '+ (car (cddr (nth 15 xterm-standard-colors)))) 0.6)) |
382 |
(setq frame-background-mode 'dark))) |
(setq default-frame-background-mode 'dark))) |
383 |
(frame-set-background-mode (selected-frame)))) |
(frame-set-background-mode (selected-frame)))) |
384 |
|
|
385 |
;; Do it! |
;; Do it! |