150 |
"Set background mode as appropriate for the default rxvt colors." |
"Set background mode as appropriate for the default rxvt colors." |
151 |
(let ((fgbg (getenv "COLORFGBG")) |
(let ((fgbg (getenv "COLORFGBG")) |
152 |
bg rgb) |
bg rgb) |
153 |
(setq frame-background-mode 'light) ; default |
(setq default-frame-background-mode 'light) |
154 |
(when (and fgbg |
(when (and fgbg |
155 |
(string-match ".*;\\([0-9][0-9]?\\)\\'" fgbg)) |
(string-match ".*;\\([0-9][0-9]?\\)\\'" fgbg)) |
156 |
(setq bg (string-to-number (substring fgbg (match-beginning 1)))) |
(setq bg (string-to-number (substring fgbg (match-beginning 1)))) |
163 |
;; The following line assumes that white is the 15th |
;; The following line assumes that white is the 15th |
164 |
;; color in rxvt-standard-colors. |
;; color in rxvt-standard-colors. |
165 |
(* (apply '+ (car (cddr (nth 15 rxvt-standard-colors)))) 0.6)) |
(* (apply '+ (car (cddr (nth 15 rxvt-standard-colors)))) 0.6)) |
166 |
(setq frame-background-mode 'dark))) |
(setq default-frame-background-mode 'dark))) |
167 |
(frame-set-background-mode (selected-frame)))) |
(frame-set-background-mode (selected-frame)))) |
168 |
|
|
169 |
;; Do it! |
;; Do it! |