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.

feh -t modular/setup/environment/wallpaper/ --thumb-height 120 --thumb-width 120

And we get. …

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.

feh -t modular/setup/environment/wallpaper/ --thumb-height 120 --thumb-width 120 -S filename

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.)

feh -t modular/setup/environment/wallpaper/ --thumb-height 120 --thumb-width 120 -S width -n

Now that’s particularly useful. And since each image has its title in the index, it’s hardly necessary to ask for it in the preview. All the same, this command will do that.

feh -t modular/setup/environment/wallpaper/ --thumb-height 120 --thumb-width 120 -S width -n -d

What’s left? Well, large folders of images are going to take a long time to load and reload. Let’s cut out that delay.

feh -t modular/setup/environment/wallpaper/ --thumb-height 120 --thumb-width 120 -S width -n -d --cache-thumbnails

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:

About these ads

3 Responses to “Making feh work for you”


  1. 1 bautz 2008/09/14 at 9:25 PM

    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

  2. 2 Cosay Nold 2008/09/16 at 2:18 AM

    Two programs that I always install: Feh and Scrot.

  3. 3 muaythaimaster74 2008/12/04 at 1:57 PM

    Don’t forget to add

    eval `cat $HOME/.fehbg` &

    to your ~/.config/openbox/autostart.sh file to start the chosen wallpaper at login.


Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s




Welcome!



Visit the Wiki!

Some recent desktops


May 6, 2011
Musca 0.9.24 on Crux Linux
150Mhz Pentium 96Mb 8Gb CF
 


May 14, 2011
IceWM 1.2.37 and Arch Linux
L2300 core duo 3Gb 320Gb

Some recent games


Apr. 21, 2011
Oolite on Xubuntu 11.04
L2300 core duo 3Gb 320Gb

Enter your email address to subscribe to this blog and receive notifications of new posts.

Join 405 other followers

License

This work is licensed under the GNU Free Documentation License. Please see the About page for details.

Blog Stats

  • 3,961,324 hits

Archives


Follow

Get every new post delivered to your Inbox.

Join 405 other followers

%d bloggers like this: