Scroll to navigation

SWAYIMG(1) Swayimg manual 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.

Display help message.
Display version information and list of supported image formats.
Start in gallery mode.
Read directories recursively.
Set order of the image list:
none: unsorted, order is system depended;
alpha: sorted alphabetically (default);
reverse: reversed alphabetically;
random: randomize list.
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%).
Run slideshow mode on startup.
Start in full screen mode.
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.
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.
Set a constant window class/app_id.
Set a configuration parameter, see swayimgrc(5) for a list of sections and its parameters.

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

Path to the socket file used for Sway IPC.
Prefix of the path to the application config file.
Shell for executing an external command and loading an image from stdout.

SIGNALS

Perform the actions specified in the config file, reload by default.
Perform the actions specified in the config file, next_file by default.

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.

2021-12-28 swayimg