Bacteria
This is a very short script that simply composes a sequence of input images. It queries the default X display for the sizes and locations of the available Xinerama screens; it then creates an output image large enough to cover all of the screens. The input images are centered (but not scaled) on each screen; the first image listed on the command line is put on the first screen, the second image on the second screen, and so on. None of the images are scaled at all. The script also prints the name of the output image it created.
For example, suppose we started with cthulhu.gif
and grumpy.jpg
as below:
Then, we invoke "bacteria cthulhu.gif grumpy.jpg result
" and get
We also get the file name "result-1600x1200+0+0-1920x1080+1600+0.png
" printed to the console. (Naturally, if you don't have one 1600x1200 screen immediately to the left of one 1920x1080 screen, you will get different results.)
Download the source for version 1.1 (released 8 November, 2009) today! New releases will be cross-posted to the Haskell and xmonad mailing lists.
Details
Bacteria is written in Haskell, but it probably doesn't make sense outside of the *nix world. Installation should be second nature for those of you familiar with Cabal. For everybody else, and assuming GHC >= 6.8:
- Install the GD library.
wget http://www.libgd.org/releases/gd-latest.tar.gz tar xf gd-latest.tar.gz cd gd-*/ ./configure && make && make install
- Install the "cabal-install" package.
wget http://hackage.haskell.org/packages/archive/cabal-install/0.6.2/cabal-install-0.6.2.tar.gz tar xf cabal-install-0.6.2.tar.gz cd cabal-install-0.6.2 ./bootstrap.sh
- Install bacteria.
cabal update cabal install bacteria
You should now be able to use bacteria! Try just running "bacteria" the first time to get a usage message.
Bugs and feature requests should go to the tracker. Log in with user name "guest" and password "secret" to see the current bugs and feature requests; log back out to submit a new bug or feature request.