Set Multiple Overlaid Images As Your Wallpaper: Part 1
This is part of how I made useful and decorative minimalist desktops for my home and work computers.
Table of Contents
Throughout this series, I will come back to my update-wallpaper.sh script and add elements overlaid on top of the main background image, wallpaper.png, but first, I need to get it started.
After setting any image as my wallpaper in one of a variety of styles, I need to actually put it in the root window. For that, I use graphics/xli, but in subsequent parts of this article, I'll explore using ImageMagick and graphics/feh as alternatives should xli become unusable or unavailable.
update-wallpaper.sh
I use a separate shellscript to put the wallpaper in the root window because I also overlay it with other images updated more frequently: a moon clock, a sun clock, and a weather radar image. Those will come later in this series, but here's the foundation:
#!/bin/sh
# Update wallpaper display with wallpaper image and desktop overlays.
# Desktop directory where wallpaper lives
#
desktop="${HOME}/pictures/desktop"
# Wallpaper filename
#
wallpaper="${desktop}/wallpaper.png"
xli -gamma 2.2 -quiet -onroot "${wallpaper}"
All I need to do for now is make sure I use the same directory and filename set-wallpaper.sh saves the wallpaper to.
Also, you may need to change or remove the "-gamma" option if the correction makes your wallpaper too light or too dark for your monitor. The setting "-gamma 2.2" is what both my home and work monitors need.
.xsession
Up to this point, my ~/.xsession file looked like this:
#!/bin/sh
# Stuff to run that makes a useful desktop goes here later.
# Finally, start the window manager, & quit X when it exits.
exec wmx
#exec twm
Now, I need to update it so that I'm not looking at a black screen on login. All my personal scripts live in ~/bin/, including set-wallpaper.sh and update-wallpaper.sh, so:
#!/bin/sh
# Custom utilities
#
bin/update-wallpaper.sh &
# Finally, start the window manager, & quit X when it exits.
exec wmx
#exec twm
And that's all for now.