The `Emacs-BGEX patch' is an unofficial patch of the FSF Emacs background extension for X.
If you apply the Emacs-BGEX patch, you can specify an image or color for the background.
You can also specify a different background for each buffer instead of per frame.
However, the background rendering is not complete because it is implemented forcibly.
I've been maintaining it for over 10 years now.
get patch-bgex_VERSION.tar.xz
$ cd /tmp
$ tar xf patch-bgex_VERSION.tar.xz
$ cp -av /tmp/patch-bgex_VERSION/bgex.el YOUR-ELISP-PATH/
$ cd YOUR-EMACS-SOURCE-PATH
$ cd src
$ patch < /tmp/patch-bgex_VERSION/patch-bgex_VERSION
$ cd ..
$ ./configure --prefix=YOUR-INSTALL-PATH && make -j15
;; Emacs-BGEX patch
(require 'bgex)
;; Image on frame
(when (boundp 'bgex-exist-p)
(bgex-set-image-default "~/.emacs.d/images/background.xpm"))
;; Image on frame (dynamic color mode (SRC * DST / factor))
(bgex-set-image-default "~/.emacs.d/images/background.xpm" t)
;; Color for HTML-mode (dynamic color mode)
(bgex-set-color "HTML" 'bgex-identifier-type-major-mode '(60000 40000 40000) t)
;; Color for buffer-name (*scratch*)
(bgex-set-color "*scratch*" 'bgex-identifier-type-buffer-name "skyblue")
;; XPM string
(bgex-set-xpm-string "*scratch*" 'bgex-identifier-type-buffer-name "XPM string" t)
(bgex-set-xpm-string-default "XPM string" t)
(set-background-color "#d0b8a0")
(set-frame-parameter nil 'bg-image-enable-flag t)
(set-frame-parameter nil 'bg-fill-alpha 0.6)
(set-frame-parameter nil 'bg-image-filename "IMAGE_PATH")
Please refer to bgex_memo_en.txt.