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 also check earlier/other articles of the FreeBSD Desktop series:
- FreeBSD Desktop – Part 1 – Simplified Boot
- FreeBSD Desktop – Part 2 – Install
- FreeBSD Desktop – Part 3 – X11 Window System
- FreeBSD Desktop – Part 4 – Key Components – Window Manager
- FreeBSD Desktop – Part 5 – Key Components – Status Bar
- FreeBSD Desktop – Part 6 – Key Components – Task Bar
- FreeBSD Desktop – Part 7 – Key Components – Wallpaper Handling
- FreeBSD Desktop – Part 8 – Key Components – Application Launcher
- FreeBSD Desktop – Part 9 – Key Components – Keyboard/Mouse Shortcuts
- FreeBSD Desktop – Part 10 – Key Components – Locking Solution
- FreeBSD Desktop – Part 11 – Key Components – Blue Light Spectrum Suppress
- FreeBSD Desktop – Part 12 – Configuration – Openbox
- FreeBSD Desktop – Part 13 – Configuration – Dzen2
- FreeBSD Desktop – Part 14 – Configuration – Tint2
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.