SWAYIMG(1)

NAME
swayimg - lightweight image viewer for Wayland display servers

SYNOPSIS
swayimg [OPTIONS]... [FILE]...

DESCRIPTION
If no input files or directories are specified, the viewer will try to read all files in the current directory.

By default, the application generates a list of images with all files in the same directory as the image being loaded. This behavior can be changed with the list.all parameter in the config file.

Use '-' as FILE to read image data from stdin.

Use prefix 'exec://' to get image data from stdout printed by external command.

OPTIONS
Mandatory arguments to long options are mandatory for short options too.

-h, --help
    Display help message.

-v, --version
    Display version information and list of supported image formats.

-g, --gallery
    Start in gallery mode.

-r, --recursive
    Read directories recursively.

-o, --order=ORDER:
    Set order of the image list:
    none: unsorted, order is system depended;
    alpha: sorted alphabetically (default);
    random: randomize list.

-s, --scale=MODE
    Set the default image scale, valid modes are:
    optimal: 100% or less to fit to window (default);
    width: fit image width to window width;
    height: fit image height to window height;
    fit: fit to window;
    fill: crop image to fill the window;
    real: real size (100%).

-l, --slideshow
    Run slideshow mode on startup.

-f, --fullscreen
    Start in full screen mode.

-p, --position=POS
    Set initial position of the window (Sway only):
    parent: set position from parent (currently active) window (default);
    X,Y: absolute coordinates of the top left corner.

-w, --size=SIZE
    Set initial size of the window:
    parent: set size from parent (currently active) window (Sway only, default);
    image: set size from the first loaded image;
    WIDTH,HEIGHT: absolute size of the window in pixels.

-a, --class=NAME
    Set a constant window class/app_id. Setting this may break the window layout.

-c, --config=SECTION.KEY=VALUE
    Set a configuration parameter, see swayimgrc(5) for a list of sections and its parameters.

KEYBINDINGS
Default key bindings can be overridden with the configuration file.

F1  Show/hide help.

Home
    Open the first file.

End Open the last file.

PgDown, Space
    Open next file.

PgUp
    Open previous file.

d   Open file from next directory.

Shift+d
    Open file from previous directory.

o   Show next frame.

Shift+o
    Show previous frame.

c   Skip the current file (remove from the image list).

s   Start/stop animation.

Shift+s
    Start/stop slideshow.

f   Toggle full screen mode.

Arrows
    Move the view point.

+, =
    Zoom in.

-   Zoom out.

w   Zoom the image to fit the window width, this will crop the image.

Shift+w
    Zoom the image to fit the window height, this will crop the image.

z   Zoom the image to fit window.

Shift+z
    Zoom the image to fill the window, this will crop the image.

0   Set scale to 100%.

Backspace
    Set optimal scale to fit the window, but not more 100%.

[   Rotate the image 90 degrees anticlockwise.

]   Rotate the image 90 degrees clockwise.

m   Flip the image vertically.

Shift+m
    Flip the image horizontally.

a   Enable/disable anti-aliasing.

r   Reset cache and reload the current image.

i   Switch the text info mode.

e   Execute external command: prints path to the current file.

Esc, q
    Exit the program.

SWAY MODE
The Sway compatible mode is automatically enabled if the environment variable SWAYSOCK points to a valid Sway IPC socket file. This mode provides some features such as setting the window position and getting the workspace layout. By default, the application creates an "overlay" above the currently active window, which gives the illusion that the image is opened directly inside the terminal window.

ENVIRONMENT

SWAYSOCK
    Path to the socket file used for Sway IPC.

XDG_CONFIG_HOME, XDG_CONFIG_DIRS, HOME
    Prefix of the path to the application config file.

SHELL
    Shell for executing an external command and loading an image from stdout.

EXIT STATUS
The exit status is 0 if the program completed successfully and 1 if an error occurred.

EXAMPLES

swayimg photo.jpg logo.png
    View multiple files.

swayimg --slideshow --recursive --order=random
    Start slideshow for all files (recursively) in the current directory in random order.

wget -qO- https://www.kernel.org/theme/images/logos/tux.png | swayimg -
    View using pipes.

swayimg "exec://wget -qO- https://www.kernel.org/theme/images/logos/tux.png"
    Loading stdout from external commands.

SEE ALSO
swayimgrc(5)

BUGS
For suggestions, comments, bug reports etc. visit the project homepage (https://github.com/artemsen/swayimg).