In the Part 7 of the FreeBSD Desktop series I would like to describe key components of self made custom desktop environment such as:
- Window Manager
- Status Bar
- Task Bar
- Wallpaper Handling
- Application Launcher
- Keyboard/Mouse Shortcuts
- Locking Solution
- Blue Light Spectrum Suppress
Today we will focus on the fourth part – the Wallpaper Handling. In the next series each of these components configuration would also be described along with eventual needed scripts.
You may want to check other articles in the FreeBSD Desktop series on the FreeBSD Desktop – Global Page where you will find links to all episodes of the series along with table of contents for each episode’s contents.
Some people do not use wallpapers at all, just a black or grey background, some set family photos, some have a set of favorite wallpapers and setup random wallpaper from this set of favorites to show up every once in a while. We will talk about the last type of setup in this article.
I have tried various applications to provide this simple feature and always came back to Feh, thus I will not compare various other solutions available and will focus on the Feh exclusively.
While Feh main/original function is to be ultra fast image viewer it also has an option to properly setup a wallpaper on a X11 desktop.
% feh --bg-[TAB] --bg-center -- set centered desktop background --bg-fill -- set scaled desktop background, preserving aspect ratio --bg-scale -- set scaled desktop background --bg-seamless -- set desktop background with seamless borders --bg-tile -- set tiled desktop background
The ZSH shell made this upper output so much easier then browsing thru
man feh page or checking its documentation 😉
The Feh is also very low on resources, if of course depends on the image size You will use, but the Feh ‘interface’ will use about 10 MB of RAM to browse an image.
But Feh as fast and powerful as it is will not ‘select’ wallpaper for us, we will have to implement little helper script to select which wallpaper we would like to use, and then we would use Feh as a backed to set this wallpaper. We will also have to implement a way to set tiled wallpapers in tiled way – not to stretch them to entire desktop.
There is not much more to add here, as we will progress to posting ‘real’ configuration we will get back to this topic with the working script.