K.Mandla's blog of Linux experiences

Making feh work for you

Edit: Unfortunately, the images originally included in this post are gone, because of image hosting problems in late 2009. My apologies.

Remember this idea, from about a year and a half ago? In that oft-linked-to chestnut, I described how you can trigger feh (quite easily, and quite obviously) from the right-click menu in Openbox, and skim through your wallpaper folder.

It’s a nifty trick, and does the job well. But after working with danpei for a day or two though, I wondered if it might not be a better idea to get a larger view of the available images, and be able to pick from those.

feh can do that too, thanks to a nifty thumbnail version. Try this from a command line.

feh -t modular/setup/environment/wallpaper

And you should get something that looks like this.

Hey look, an index of all the image files in that directory. And when you mouse over them, they highlight. And when you click …

A nifty preview of the image at natural size. Right click and there is the aforementioned menu, including the option to set the image as the background of the root window. Clicking a new image in the thumbnail list gives you a new preview (which is to say, not an additional preview window). Kind of like what danpei does. ;)

Now let’s get crazy. feh’s “thumbnail mode” has a few options available to it. Let’s get a better look at some of those images, before we click.

That’s better. Now we can see a little more detail than with the default. It’s important to mention at this point, that if you want to scroll down in the image array, you need to left-click and drag in an open area.

Now let’s see. What else would be nice? Well, for starters, it would be useful to have the files sorted by name. As it is now, they’re kind of scattered.

That’s better still. But wait, what might be better is to sort them by size, since some of these wallpapers are meant for machines with different screen resolutions. Let’s say the width of the image is what determines it’s place in the array, and let’s set to to run from widest to least wide. (There’s a short delay when it does this, since it’s necessary to preload each image before it can be sorted. Keep that in mind on slow machines.)

And if you skim through those images later, it should be considerably faster.

What other fun can we get for free? Well, how about built-in rotating, scaling, sharpening and zoom features, plus programmable keypress “macros,” multiple configuration files, directory recursion, xinerama support, http access, refreshing features (think: webcams) … and so much more. If I was half as smart and had twice as much time, I’d dedicate a whole separate blog to feh.

And fellow Openbox maniacs can easily hard-wire half of the features and two-thirds of the subfeatures into pipe menus and keypress commands. feh and Openbox go together like peas and carrots.

Do not, under any circumstances, let this amazing little program escape your notice. Anything — and I mean anything — you could want to do with a list of images (including making a list of images, if you can believe that) is well within feh’s power. And it will do some of these things faster and easier than the supposed gold-standard heavyweights, like the Gimp, et al. Install now. :mrgreen:

Post navigation

3 thoughts on “Making feh work for you”

Respect for feh (though i use notrogen (I love GTK2)).
But who use the Gimp for setting the Desktop wallpaper?
No one i think.
Gimp is a professional program for manipulating photograph, create graphic, etc. Not for setting a desktop.
For what it can do is very very light and fast.
You can compare feh’s desktop background with xfdesktop, nautilus or whatever desktop bakground setter you want, but not with The Gimp.
The same way you can’t compare leafpad with abiword, or mpd with ardour