注意:

The Funtoo Linux project has transitioned to "Hobby Mode" and this wiki is now read-only.

Difference between revisions of "Package:Feh"

From Funtoo
Jump to navigation Jump to search
m (Sorry for another edit.)
 
(12 intermediate revisions by the same user not shown)
Line 6: Line 6:
}}
}}
=== What is feh? ===
=== What is feh? ===
<blockquote>
<blockquote>
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.[http://feh.finalrewind.org/ Feh homepage]
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. [http://feh.finalrewind.org/ Feh homepage]
</blockquote>
</blockquote>


== USE-Flags ==
== USE-Flags ==
;<code>curl</code>: Add support for the Client-Side URL transfer library.
;<code>curl</code>: Add support for the Client-Side URL transfer library.
;<code>debug</code>: 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.
;<code>debug</code>: 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.
Line 26: Line 24:
== Using feh ==
== Using feh ==
=== Set desktop background ===
=== Set desktop background ===
<tt>feh</tt> has several options for setting your desktop background:
==== Command line switches and examples ====
* <tt>--bg-center</tt>: 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.
<code>feh</code> provides several different geometries to set your desktop background:
* <tt>--bg-scale</tt>: 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.
* <code>--bg-center</code>: 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.
* <tt>--bg-fill</tt>: Similar to <tt>--bg-scale</tt> 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.
<console>
* <tt>--bg-max</tt>: Similar to <tt>--bg-fill</tt>, except that scales the image to the maximum size that fits the screen. This leads to black borders on one side.
$##i## feh --bg-center ~/Pictures/Wallpaper/MyFavoriteWallpaper.png
* <tt>--bg-tile</tt>: Tile the image across the screen.
</console>


Here is an example:
* <code>--bg-scale</code>: 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.
* <code>--bg-fill</code>: Similar to <code>--bg-scale</code> 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.
* <code>--bg-max</code>: Similar to <code>--bg-fill</code>, except that scales the image to the maximum size that fits the screen. This leads to black borders on one side.
* <code>--bg-tile</code>: Tile the image across the screen.
* <code>--random <name of directory to choose random image from></code>: Allow feh to choose a random wallpaper from a directory of pictures.
<console>
<console>
###i## feh --bg-scale ~/path/to/picture.jpg
$##i## feh --bg-<your background geometry preference> --random ~/Pictures/Wallpapers/*
</console>
</console>
*<code>--no-fehbg</code>: If you do not intend to use the <code>~/.fehbg</code> file, you can disable it using this switch.
<console>
$##i## feh --no-fehbg --bg-<background geometry preference> ~/Pictures/Wallpapers/MySecondFavoriteWallpaper.jpg
</console>
{{note|The <code>~/Pictures/Wallpapers/</code> directory is not where you have to store your desktop wallpapers. It is just an example.}}


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


{{file|name=~/.config/openbox/autostart|desc= |body=
{{file|name=~/.config/openbox/autostart|desc= |body=
Line 46: Line 55:
...
...
}}
}}
=== 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 <code>sleep 1m</code> can be configured to any time interval that you want. Name the script whatever you want. Something like <code>WallpaperShuffle</code> will work just fine:
<syntaxhighlight lang="bash"
#!/bin/bash
</syntaxhighlight>
{{PageNeedsUpdates}}
{{EbuildFooter}}
{{EbuildFooter}}

Latest revision as of 23:09, November 21, 2014

Feh

   Tip

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

USE-Flags

curl
Add support for the Client-Side URL transfer library.
debug
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.
exif
Add support for reading EXIF headers from JPEG and TIFF images.
xinerama
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:

root # emerge feh

Using feh

Set desktop background

Command line switches and examples

feh provides several different geometries to set 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.
user $ feh --bg-center ~/Pictures/Wallpaper/MyFavoriteWallpaper.png
  • --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.
  • --random <name of directory to choose random image from>: Allow feh to choose a random wallpaper from a directory of pictures.
user $ feh --bg-<your background geometry preference> --random ~/Pictures/Wallpapers/*
  • --no-fehbg: If you do not intend to use the ~/.fehbg file, you can disable it using this switch.
user $ feh --no-fehbg --bg-<background geometry preference> ~/Pictures/Wallpapers/MySecondFavoriteWallpaper.jpg
   Note

The ~/Pictures/Wallpapers/ directory is not where you have to store your desktop wallpapers. It is just an example.

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:

   ~/.config/openbox/autostart
...
~/.fehbg &
...