Skip to content
Snippets Groups Projects
feh.pre 43 KiB
Newer Older
  • Learn to ignore specific revisions
  • Birte Kristina Friesel's avatar
    Birte Kristina Friesel committed
    For instance, if you have multiple screens connected and use e.g.
    
    will center or appropriately offset the image on each screen.
    
    Birte Kristina Friesel's avatar
    Birte Kristina Friesel committed
    You may even specify more than one file, in that case, the first file is set
    on screen 0, the second on screen 1, and so on.
    
    Birte Kristina Friesel's avatar
    Birte Kristina Friesel committed
    Use
    .Cm --no-xinerama
    
    orbea's avatar
    orbea committed
    to treat the whole X display as one screen when setting wallpapers.
    You may also use
    
    .Cm --xinerama-index
    to use
    .Nm
    as a background setter for a specific screen.
    
    .Bl -tag -width indent
    .
    .It Cm --bg-center
    
    orbea's avatar
    orbea committed
    Center the file on the background.
    If it is too small, it will be surrounded by a border as specified by
    
    orbea's avatar
    orbea committed
    but preserves aspect ratio by zooming the image until it fits.
    Either a horizontal or a vertical part of the image will be cut off
    
    but scale the image to the maximum size that fits the screen with borders on one side.
    The border color can be set using
    .Cm --image-bg .
    
    Fit the file into the background without repeating it, cutting off stuff or
    
    orbea's avatar
    orbea committed
    using borders.
    But the aspect ratio is not preserved either
    
    Tile
    .Pq repeat
    the image in case it is too small for the screen
    .
    
    .Sh FORMAT SPECIFIERS
    
    .Bl -tag -width indent
    
    Image path/filename
    
    .It %F
    .
    Escaped image path/filename
    .Pq for use in shell commands
    .
    
    .It %g
    .
    w,h window dimensions in pixels (mnemonic: geometry)
    .
    
    Total number of files in filelist
    
    orbea's avatar
    orbea committed
    Temporary copy of filelist.
    Multiple uses of %L within the same format string will return the same copy.
    
    .It %o
    .
    x,y offset of top-left image corner to window corner in pixels
    .
    
    Number of image pixels
    
    Number of image pixels in human-readable format with k/M
    
    orbea's avatar
    orbea committed
    Image rotation.
    A half right turn equals pi.
    
    Image size in bytes
    
    Number of current file
    
    Current image zoom, rounded to two decimal places
    .
    .It %Z
    .
    Current image zoom, higher precision
    
    .Sh CONFIGURATION
    
    has three config files:
    
    for theme definitions,
    
    for key bindings and
    .Pa buttons
    for mouse button bindings.
    
    It will try to read them from
    .Pa $XDG_CONFIG_HOME/feh/ ,
    which
    .Pq when XDG_CONFIG_HOME is unset
    defaults to
    .Pa ~/.config/feh/ .
    If the files are not found in that directory, it will also try
    .Pa /etc/feh/ .
    .Pp
    All config files treat lines starting with a
    .Qq #
    character as comments.
    Note that mid-line comments are not supported.
    .
    
    .Sh THEMES CONFIG SYNTAX
    
    .Pa .config/feh/themes
    allows the naming of option groups, called themes.
    
    It takes entries of the form
    .Qq Ar theme options ... ,
    where
    .Ar theme
    is the name of the entry and
    .Ar options
    are the options which will be applied when the theme is used.
    
    .Pp
    .
    Note that the option parser does not behave like a normal shell: filename
    expansion and backslash escape sequences are not supported and passed to
    
    orbea's avatar
    orbea committed
    feh's option parser as-is.
    However, quoting of arguments is respected and can be used for arguments
    with whitespace.
    
    .
    So, the sequence
    .Qq --info Qq foo bar
    works as intended
    .Pq that is, it display the string Qq foo bar ,
    whereas the option string
    .Qq --info foo\e bar
    will only display
    .Qq foo\e
    and complain about the file bar not existing.
    Please keep this in mind when writing theme files.
    
    .Qq imagemap -rVq --thumb-width 40 --thumb-height 30 --index-info \&'%n\en\&%wx\&%h\&' .
    
    orbea's avatar
    orbea committed
    You can use this theme in two ways.
    Either call
    
    or create a symbolic link to
    .Nm
    
    orbea's avatar
    orbea committed
    with the name of the theme you want it to use.
    For the example above, this would be
    
    .Qo
    ln -s `which
    .Nm
    ` ~/bin/imagemap
    .Qc .
    Now just run
    .Qq imagemap *.jpg
    to use these options.
    
    Note that you can split a theme over several lines by placing a backslash at
    
    Command line options always override theme options.
    
    .Sh KEYS CONFIG SYNTAX
    
    .Pa .config/feh/keys
    defines key bindings.
    It has entries of the form
    
    .Qq Ar action Op Ar key1 Op Ar key2 Op Ar key3 .
    
    Each
    .Ar key
    is an X11 keysym name as shown by
    .Xr xev 1 ,
    like
    .Qq Delete .
    
    Birte Kristina Friesel's avatar
    Birte Kristina Friesel committed
    It may optionally start with modifiers for things like Control, in which case
    
    .Ar key
    looks like
    
    .Ar mod Ns No - Ns Ar keysym
    
    Birte Kristina Friesel's avatar
    Birte Kristina Friesel committed
    .Po
    for example
    .Qq C-Delete
    for Ctrl+Delete or
    .Qq C-1-Delete
    for Ctrl+Alt+Delete
    .Pc
    
    Available modifiers are
    
    Birte Kristina Friesel's avatar
    Birte Kristina Friesel committed
    .Ar C No for Control ,
    .Ar S No for Shift and
    
    To match an uppercase letter like
    .Qq S
    instead of
    .Qq s ,
    the Shift modifier is not required.
    
    Specifying an
    .Ar action
    without any keys unbinds it (i.e. the default bindings are removed).
    
    orbea's avatar
    orbea committed
    Do not use the same keybinding for multiple actions.
    When binding an action to a new key
    
    Birte Kristina Friesel's avatar
    Birte Kristina Friesel committed
    .Pq or mouse button ,
    make sure to unbind it from its previous action, if present.
    
    .Nm
    does not check for conflicting bindings, so their behaviour is undefined.
    .
    .Pp
    .
    
    Birte Kristina Friesel's avatar
    Birte Kristina Friesel committed
    For a list of the
    
    .Ar action
    names, see
    
    Note that not all of the key names used there correspond to X11 keysyms.
    Most notably, page up
    .Pq Prior / Page_Up ,
    page down
    .Pq Next / Page_Down
    and the keypad keys
    .Pq KP_*
    do not.
    
    The following actions and default key bindings can be used in an image window.
    .Pq The strings in Bo square brackets Bc are the config action names .
    .
    If
    .Nm
    is running inside a terminal and its standard input is not used for images or
    
    orbea's avatar
    orbea committed
    filelists, key input from the terminal is also accepted.
    However, terminal input support is currently limited to most alphanumeric
    characters
    
    .Pq 0-9 a-z A-Z and some more ,
    return and backspace.
    
    .Bl -tag -width indent
    
    .
    .It a Bq toggle_actions
    
    Toggle actions display
    .Pq see Cm --draw-actions
    
    .It c Bq toggle_caption
    
    orbea's avatar
    orbea committed
    Caption entry mode.
    If
    
    .Cm --caption-path
    
    orbea's avatar
    orbea committed
    has been specified, then this enables caption editing.
    The caption at the bottom of the screen will turn yellow and can be edited.
    Hit return to confirm and save the caption, or escape to cancel editing.
    Note that you can insert an actual newline into the caption using
    
    .
    .It d Bq toggle_filenames
    
    Toggle filename display
    .Pq see Cm --draw-filename
    
    .Pq optional feature, $MAN_EXIF$ in this build
    
    .It f Bq save_filelist
    
    Save the current filelist as
    .Qq feh_PID_ID_filelist
    
    .It g Bq toggle_fixed_geometry
    .
    Enable/Disable automatic window resize when changing images.
    .
    
    .It h Bq toggle_pause
    
    orbea's avatar
    orbea committed
    Pause/Continue the slideshow.
    When it is paused, it will not automatically change slides based on
    
    .Cm --slideshow-delay .
    
    .It i Bq toggle_info
    .
    Toggle info display
    .Pq see Cm --info
    .
    
    orbea's avatar
    orbea committed
    Toggle zoom and viewport keeping.
    When enabled,
    
    .Nm
    will keep zoom and X, Y offset when switching images.
    .
    
    .It m Bq toggle_menu
    
    orbea's avatar
    orbea committed
    Show menu.
    Use the arrow keys and return to select items,
    
    .Aq escape
    to close the menu.
    
    .It n , Ao space Ac , Ao Right Ac Bq next_img
    
    orbea's avatar
    orbea committed
    Show next image.
    Selects the next image in thumbnail mode.
    
    .
    .It o Bq toggle_pointer
    
    Toggle pointer visibility
    
    .It p , Ao BackSpace Ac , Ao Left Ac Bq prev_img
    
    orbea's avatar
    orbea committed
    Show previous image.
    Selects the previous image in thumbnail mode.
    
    .
    .It q , Ao Escape Ac Bq quit
    
    Birte Kristina Friesel's avatar
    Birte Kristina Friesel committed
    Quit
    .Nm
    
    orbea's avatar
    orbea committed
    Reload current image.
    Useful for webcams
    
    Save the current image as
    .Qq feh_PID_ID_FILENAME
    
    .
    .It v Bq toggle_fullscreen
    
    Toggle fullscreen
    
    .
    .It w Bq size_to_image
    
    Change window size to fit current image size
    
    orbea's avatar
    orbea committed
    In scale-down and fixed-geometry mode, this also updates the window size limits.
    
    Close current window
    
    Jump to a random position in the current filelist
    
    .It Z Bq toggle_auto_zoom
    .
    Toggle auto-zoom.
    .
    
    .It \&[, \&] Bq prev_dir, next_dir
    .
    Jump to the first image of the previous or next sequence of images sharing
    
    orbea's avatar
    orbea committed
    a directory name in the current filelist.
    Use --sort dirname if you would like to ensure that all images in a directory
    are grouped together.
    
    .It < , > Bq orient_3 , orient_1
    
    In place editing - rotate the image 90 degrees (counter)clockwise.
    
    The rotation is lossless, but may create artifacts in some image corners when
    
    orbea's avatar
    orbea committed
    used with JPEG images.
    Rotating in the reverse direction will make them go away.
    See
    
    for more about lossless JPEG rotation.
    
    orbea's avatar
    orbea committed
    assumes that this feature is used to normalize image orientation.
    For JPEG images, it will unconditionally set the EXIF orientation
    tag to 1
    
    .Pq Qq 0,0 is top left
    
    orbea's avatar
    orbea committed
    after every rotation.
    See
    
    .Xr jpegexiforient 1
    for details on how to change this flag.
    
    .It _ Bq flip
    .
    In place editing - vertical flip
    .
    .It | Bq mirror
    .
    
    In place editing - horizontal flip
    
    .It 0 .. 9 Bq action_0 .. action_9
    
    Execute the corresponding action
    .Pq 0 = Cm --action , No 1 = Cm --action1 No etc.
    
    .
    .It Ao Return Ac Bq action_0
    
    Run the command defined by
    .Cm --action
    
    Show first image
    
    Show last image
    
    .
    .It Ao page up Ac Bq jump_fwd
    
    Go forward ~5% of the filelist
    
    .
    .It Ao page down Ac Bq jump_back
    
    Go backward ~5% of the filelist
    
    Increase reload delay by 1 second
    
    Decrease reload delay by 1 second
    
    Remove current file from filelist
    
    Remove current file from filelist and delete it
    
    .It Ao keypad Left Ac , Ao Ctrl+Left Ac Bq scroll_left
    
    Scroll to the left
    
    .It Ao keypad Right Ac , Ao Ctrl+Right Ac Bq scroll_right
    
    Scroll to the right
    
    .
    .It Ao keypad up Ac , Ao Ctrl+Up Ac Bq scroll_up
    
    .It Ao keypad Down Ac , Ao Ctrl+Down Ac Bq scroll_down
    
    Scroll down.
    Note that the scroll keys work without anti-aliasing for performance reasons,
    hit the render key after scrolling to antialias the image.
    
    .It Aq Alt+Left Bq scroll_left_page
    
    Birte Kristina Friesel's avatar
    Birte Kristina Friesel committed
    .
    Scroll to the left by one page
    .
    
    .It Aq Alt+Right Bq scroll_right_page
    
    Birte Kristina Friesel's avatar
    Birte Kristina Friesel committed
    .
    Scroll to the right by one page
    .
    
    .It Aq Alt+Up Bq scroll_up_page
    
    Birte Kristina Friesel's avatar
    Birte Kristina Friesel committed
    .
    Scroll up by one page
    .
    
    Birte Kristina Friesel's avatar
    Birte Kristina Friesel committed
    .It Aq Alt+Down Bq scroll_down_page
    
    Birte Kristina Friesel's avatar
    Birte Kristina Friesel committed
    .
    Scroll down by one page
    .
    
    .It R, Ao keypad begin Ac Bq render
    
    Antialias the image.
    Opens the currently selected image in thumbnail mode.
    
    .
    .It Ao keypad + Ac , Ao Up Ac Bq zoom_in
    
    .
    .It Ao keypad - Ac , Ao Down Ac Bq zoom_out
    
    .It *, Ao keypad * Ac Bq zoom_default
    
    .It /, Ao keypad / Ac Bq zoom_fit
    
    Zoom to fit the window size
    
    Ernie Ewert's avatar
    Ernie Ewert committed
    .
    Zoom to fill the window size like
    .Cm --bg-fill
    .
    
    Birte Kristina Friesel's avatar
    Birte Kristina Friesel committed
    The following keys bindings are used for the
    .Nm
    menu:
    
    .
    .Bl -tag -width indent
    .
    .It Ao Escape Ac Bq menu_close
    
    Close the menu
    .
    .It Ao Up Ac Bq menu_up
    
    Highlight previous menu item
    .
    .It Ao Down Ac Bq menu_down
    
    Highlight next menu item
    .
    .It Ao Left Ac Bq menu_parent
    
    Highlight parent menu item
    .
    .It Ao Right Ac Bq menu_child
    
    Highlight child menu item
    .
    
    .It Ao Return Ac , Ao space Ac Bq menu_select
    
    Select highlighted menu item
    .
    .El
    
    .Pa .config/feh/buttons .
    
    This works like the keys config file: the entries are of the form
    .Qq Ar action Op Ar binding .
    .
    .Pp
    .
    Each
    .Ar binding
    
    orbea's avatar
    orbea committed
    is a button number.
    It may optionally start with modifiers for things like Control, in which case
    
    .Ar binding
    looks like
    .Ar mod Ns No - Ns Ar button
    .Pq for example "C-1" for Ctrl + Left button .
    .
    .Pp
    .
    
    .Em Note :
    Do not use the same button for multiple actions.
    .Nm
    does not check for conflicting bindings, so their behaviour is undefined.
    .
    Either unbind the unwanted action, or bind it to another unused button.
    .
    The order in which you bind / unbind does not matter, though.
    .
    .Pp
    .
    
    For the available modifiers, see
    .Sx KEYS CONFIGURATION SYNTAX .
    .
    .
    .Ss BUTTONS
    .
    In an image window, the following buttons may be used
    
    .Pq The strings in Bo square brackets Bc are the config action names .
    Additionally, all actions specified in the
    .Sx KEYS
    section can also be bound to a button.
    
    .
    Reload current image
    .
    .It 1 Ao left mouse button Ac Bq pan
    .
    pan the current image
    .
    .It 2 Ao middle mouse button Ac Bq zoom
    .
    Zoom the current image
    .
    
    .It 3 Ao right mouse button Ac Bq toggle_menu
    
    .It 4 Ao mousewheel down Ac Bq prev_img
    
    .It 5 Ao mousewheel up Ac Bq next_img
    
    .
    Show next image
    .
    .It Ctrl+1 Bq blur
    .
    Blur current image
    .
    .It Ctrl+2 Bq rotate
    .
    Rotate current image
    .
    
    .It unbound Bq zoom_in
    .
    Zoom in
    .
    .It unbound Bq zoom_out
    .
    Zoom out
    .
    .
    
    .Sh MOUSE ACTIONS
    
    Default Bindings:
    When viewing an image, mouse button 1 pans the image
    .Pq moves it around
    
    or, when only clicked, moves to the next image
    
    .Pq slideshow mode only .
    Quick drags with less than 2px of movement per axis will be treated as clicks
    
    Birte Kristina Friesel's avatar
    Birte Kristina Friesel committed
    to aid graphics tablet users.
    
    .Po click and drag left->right to zoom in, right->left to zoom out, click once
    to restore zoom to 100%
    
    and mouse button 3 opens the menu.
    
    Ctrl+Button 1 blurs or sharpens the image
    
    .Pq drag left to blur, right to sharpen ;
    
    Ctrl+Button 2 rotates the image around the center point.
    
    A note about pan and zoom modes:
    In pan mode, if you reach a window border but haven't yet panned to the end of
    the image,
    .Nm
    will warp your cursor to the opposite border so you can continue panning.
    
    When clicking the zoom button and immediately releasing it, the image will be
    
    orbea's avatar
    orbea committed
    back at 100% zoom.
    When clicking it and moving the mouse while holding the button down, the zoom
    will be continued at the previous zoom level.
    The zoom will always happen so that the pixel on which you entered the zoom mode
    remains stationary.
    So, to enlarge a specific part of an image, click the zoom button on that part.
    
    In slideshow mode,
    .Nm
    handles the following signals:
    
    .Sh USAGE EXAMPLES
    
    orbea's avatar
    orbea committed
    Here are some examples of useful option combinations.
    See also:
    
    .Aq http://feh.finalrewind.org/examples/
    
    .Bl -tag -width indent
    
    Recursively show all images found in ~/Pictures and subdirectories
    
    .It feh -rSfilename --version-sort ~/Pictures
    
    orbea's avatar
    orbea committed
    Same as above, but sort naturally.
    By default, feh will show files in the string order of their names, meaning e.g.
    
    .Qq foo 10.jpg
    will come before
    .Qq foo 2.jpg .
    In this case, they are instead ordered as a human would expect.
    
    .It feh -t -Sfilename -E 128 -y 128 -W 1024 ~/Pictures
    
    Show 128x128 pixel thumbnails, limit window width to 1024 pixels.
    .
    
    .It feh -t -Sfilename -E 128 -y 128 -W 1024 -P -C /usr/share/fonts/truetype/ttf-dejavu/ -e DejaVuSans/8 ~/Pictures
    
    Same as above, but enable thumbnail caching in ~/.thumbnails and use a smaller
    font.
    .
    
    .It feh -irFarial/14 -O index.jpg ~/Pictures
    
    Make an index print of ~/Pictures and all directories below it, using 14 point
    
    orbea's avatar
    orbea committed
    Arial to write the image info under each thumbnail.
    Save the image as index.jpg and don't display it, just exit.
    Note that this even works without a running X server
    
    .It feh --unloadable -r ~/Pictures
    
    Print all unloadable images in ~/Pictures, recursively
    
    .It feh -f by_width -S width --reverse --list \&.
    .
    Write a list of all images in the directory to by_width, sorted by width
    .Pq widest images first
    .
    
    Open each image in ~/Pictures/holidays in its own window
    
    .It feh -FD5 -Sname ~/Pictures/presentation
    
    Show the images in .../presentation, sorted by name, in fullscreen,
    automatically change to the next image after 5 seconds
    
    .It feh -rSwidth -A Qo mv %F ~/images/\&%N Qc ~/Pictures
    
    View all images in ~/Pictures and below, sorted by width, move an image to
    
    ~/image/image_name when enter is pressed
    
    orbea's avatar
    orbea committed
    View all images in the current directory, starting with foo.jpg.
    All other images are still in the slideshow and can be viewed normally
    
    .It feh --info \&"exifgrep '\&(Model\&|DateTimeOriginal\&|FNumber\&|ISO\&|Flash\&)' %F \&| cut -d \&. -f 4-\&" \&.
    
    Show some EXIF information, extracted by exifprobe/exifgrep
    
    .It feh --action 'rm %F' -rl --max-dim 1000x800
    .
    
    Recursively remove all images with dimensions below or equal to 1000x800 pixels
    
    .Nm
    requires the
    .Cm jpegtran
    
    .Pq usually distributed in Qo libjpeg-progs Qc or similar
    for lossless rotation.
    
    To view images from URLs such as http://, you need
    .Nm
    
    orbea's avatar
    orbea committed
    compiled with libcurl support (enabled by default).
    See the
    
    .Sx VERSION
    section.
    
    On systems with giflib 5.1.2,
    
    orbea's avatar
    orbea committed
    may be unable to load gif images.
    For affected mips, mipsel and arm devices, gif support is completely
    broken, while on x86 / x86_64 gifs can usually only be loaded if they are
    the first image in the filelist.
    
    This appears to be a bug in giflib,
    see
    
    .Aq https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=813729
    
    orbea's avatar
    orbea committed
    for details.
    Workaround: Use
    
    .Pq or some other positive value
    
    to load gifs with imagemagick instead, or downgrade to giflib 5.1.1, or
    upgrade to giflib 5.1.4.
    
    Thumbnail mode is somewhat inefficient, and because of that not nearly as fast
    as it could be.
    
    .Pp
    .
    .Cm --scale-down
    does not take window decorations into account and may therefore make the
    window slightly too large.
    .
    
    .Pp
    .
    When enabled,
    .Cm --magick-timeout
    may clutter
    .Pa /tmp
    
    orbea's avatar
    orbea committed
    with temporary files produced by ImageMagick.
    This happens whenever an image is not loaded due to the conversion taking
    longer than the specified timeout.
    
    .Ss REPORTING BUGS
    
    Birte Kristina Friesel's avatar
    Birte Kristina Friesel committed
    If you find a bug, please report it to
    
    .Aq derf+feh@finalrewind.org
    
    .Aq http://github.com/derf/feh/issues .
    You are also welcome to direct any feh-related comments/questions/... to #feh
    on irc.oftc.net.
    
    Please include the feh version
    .Aq the output of Qq feh --version ,
    
    steps to reproduce the bug and, if necessary, images to reproduce it.
    
    .Sh FUTURE PLANS
    
    Plans for the following releases:
    
    .Bl -bullet -compact
    .
    .It
    Make zoom options more intuitive
    .
    .El
    .
    .
    
    Copyright (C) 1999, 2000 by Tom Gilbert (and various contributors).
    
    Copyright (C) 2010-2016 by Daniel Friesel (and even more contributors).
    
    Permission is hereby granted, free of charge, to any person obtaining a copy
    of this software and associated documentation files (the "Software"), to
    deal in the Software without restriction, including without limitation the
    rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
    sell copies of the Software, and to permit persons to whom the Software is
    furnished to do so, subject to the following conditions:
    
    The above copyright notice and this permission notice shall be included in
    all copies of the Software and its documentation and acknowledgment shall be
    given in the documentation and software packages that this Software was
    used.
    
    THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
    IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
    
    orbea's avatar
    orbea committed
    FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
    IN NO EVENT SHALL THE AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
    
    LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
    
    orbea's avatar
    orbea committed
    OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
    SOFTWARE.
    
    Current developer: Daniel Friesel
    
    .Aq derf@finalrewind.org