background image

Description

Draws a background image in place of the defaultbg color. Instead of loading an image file itself, st uses the pixmap published by the companion program stbg in the _ST_BACKGROUND_IMAGE root window property. Every st instance tiles the same server-side pixmap, so the image data is held in memory only once and all instances stay in sync.

Download

Usage

The background image is set by the separate stbg tool, which reads a farbfeld image and publishes it on the root window:

cc -o stbg stbg.c -lX11
stbg wallpaper.ff
stbg - < wallpaper.ff

Once the image is published, every st started afterwards tiles it across its window. Re-running stbg with a new image updates all running st instances immediately; there is no need to restart or reload them.

Pseudo Transparency

The variable pseudotransparency in config.def.h fixes the coordinates of the background image to the screen origin. This emulates the effect of transparency without the need for an X composite manager.

Hint: Because image processing is done outside of st, effects can be applied to the desktop background in an automated fashion with external tools. Pictured below is an example of the result of a darken and blur operation using farbfeld utilities:

jpg2ff < wallpaper.jpg | ff-border e 50 | ff-bright rgba 0 0.5 1 | ff-blur 50 15 | stbg -

Screenshot

Legacy versions

Older versions of this patch loaded the farbfeld image directly inside st. They still work but have several shortcomings that are fixed by the 0.9.3 version above:

Legacy downloads:

Authors