table of contents
SWAYIMG(1) | Swayimg manual | SWAYIMG(1) |
NAME¶
swayimg - 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.
Use '-' as FILE to read image data from stdin.
Use prefix exec:// to get image data from stdout printed by external command.
OPTIONS¶
-h, --help
-v, --version
-g, --gallery
-l, --slideshow
-F, --from-file
-r, --recursive
-o, --order=ORDER
- none: unsorted;
- alpha: sorted alphabetically;
- numeric: sorted numerically;
- mtime: sorted by file modification time;
- size: sorted by file size;
- random: randomize list.
-s, --scale=MODE
- 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%);
- keep: keep the same scale as for previously viewed image.
-f, --fullscreen
-p, --position=auto|X,Y
- auto: let the window manager control the window position (default);
- X,Y: absolute coordinates of the top left corner, e.g. 100,200.
-w, --size=fullscreen|image|W,H
- fullscreen: use full screen mode;
- image: set size from the first frame of the first image;
- W,H: absolute size of the window in pixels, default is 1280,720.
-a, --class=NAME
-i, --ipc=FILE
-c, --config=SECTION.KEY=VALUE
-C, --config-file=FILE
SWAY/HYPRLAND INTEGRATION¶
Sway/Hyprland integration mode is automatically enabled if IPC for these compositors is present in the system. 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
HYPRLAND_INSTANCE_SIGNATURE, XDG_RUNTIME_DIR
XDG_CONFIG_HOME, XDG_CONFIG_DIRS, HOME
XDG_CACHE_HOME, HOME
SHELL
SIGNALS¶
SIGUSR1, SIGUSR2
EXIT STATUS¶
The exit status is 0 if the program completed successfully and 1 if an error occurred.
EXAMPLES¶
View multiple files:
swayimg photo.jpg logo.png
Start slideshow for all files (recursively) in the current directory in random order:
swayimg --slideshow --recursive --order=random
View using pipes:
wget -qO- https://www.kernel.org/theme/images/logos/tux.png | swayimg -
Loading stdout from external commands:
swayimg "exec://wget -qO- https://www.kernel.org/theme/images/logos/tux.png" \
"exec://curl -so- https://www.kernel.org/theme/images/logos/tux.png"
View all images from the current directory in gallery mode:
swayimg --gallery
SEE ALSO¶
BUGS¶
For suggestions, comments, bug reports, etc. visit the project homepage https://github.com/artemsen/swayimg.
2025-06-29 | swayimg |