Difference between revisions of "Package:Feh"

Line 65: Line 65:

Revision as of 12:00, September 17, 2014


Source Repository:Repository:Gentoo Portage Tree


Summary: A fast, lightweight imageviewer using imlib2



Project Unfork Status

Here's an update on Project Unfork, plus other neat things.
2015-10-03 by Drobbins

IP Space Migration Continues

All Funtoo user containers in the 8.28 IP space will be moving into our new IP space (172.97) over the next few days. If you have DNS set up -- be sure to watch your container and update to the new IP! container.host.funtoo.org DNS will be updated after the move.
2015-08-27 by Drobbins

Funtoo Hosting IP Move

Funtoo user containers with IPs in the 72.18.x.x range will be gradually migrating to new IP addresses this week. If you have DNS entries for your containers, please be aware that your DNS will need to be updated.
2015-08-11 by Drobbins



We welcome improvements to this page. To edit this page, Create a Funtoo account. Then log in and then click here to edit this page. See our editing guidelines to becoming a wiki-editing pro.

What is feh?

feh is an X11 image viewer aimed mostly at console users. Unlike most other viewers, it does not have a fancy GUI, but simply displays images. It is controlled via commandline arguments and configurable key/mouse actions.Feh homepage


Add support for the Client-Side URL transfer library.
Enable extra debug codepaths, like asserts and extra output. If you want to get meaningful backtraces, see http://www.gentoo.org/proj/en/qa/backtraces.xml.
Add support for reading EXIF headers from JPEG and TIFF images.
Add support for the xinerama X11 extension, which is mandator if you work in a multiple monitor setup.

Installing feh

After adding your USE flags (or not) to /etc/portage/package.use/feh, you can emerge feh:

# emerge feh

Using feh

Set desktop background

feh has several options for setting your desktop background:

  • --bg-center: Center the image file on the background. If the image file is smaller in resolution than the screen resolution, it will have black borders around it.
  • --bg-scale: Fit the image to the background without repeating it, cutting parts of the image off, or using black borders. Because of these changes, the aspect ratio is not preserved.
  • --bg-fill: Similar to --bg-scale except that it tries to fill the image to the screen while maintaining its aspect ratio. This may result in parts of the image being cut off.
  • --bg-max: Similar to --bg-fill, except that scales the image to the maximum size that fits the screen. This leads to black borders on one side.
  • --bg-tile: Tile the image across the screen.

Here is an example:

# feh --bg-scale ~/path/to/picture.jpg

Source fehbg to set your wallpaper in Openbox

After you have run feh one time, the directory of the image file is stored in ~/.fehbg. This file can be sourced in your .config/openbox/autostart to load the picture instead of typing out feh --bg-scale /picture/location.jpg:

~/.fehbg &

Change wallpaper automatically

With the help of a simple bash script, feh can be configured to automatically change the desktop background. To accomplish this task, we have to create the bash script. Open up your favorite editor and create a script that looks something like the following, where sleep 1m can be configured to any time interval that you want. Name the script whatever you want. Something like WallpaperShuffle will work just fine:

WallpaperShuffle (bash source code)
while true; do
    feh --bg-scale "$(find ~/Pictures/Wallpapers/ -type f | sort -R | tail 1)" &
    sleep 1m &
~/Pictures/Wallpapers/ can be replaced by any directory that you have a hoard of image files in.

After creating this script, we have to source it in our window manager's startup file. For example, if you are using Openbox, source it in .config/openbox/autostart:

WallpaperShuffle &