table of contents
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.
- -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); reverse: reversed alphabetically; 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.
- -c, --config=SECTION.KEY=VALUE
-
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¶
- 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.
SIGNALS¶
EXIT STATUS¶
The exit status is 0 if the program completed successfully and 1 if an error occurred.
EXAMPLES¶
swayimg photo.jpg logo.png
swayimg --slideshow --recursive --order=random
wget -qO- https://www.kernel.org/theme/images/logos/tux.png | swayimg -
swayimg "exec://wget -qO- https://www.kernel.org/theme/images/logos/tux.png"
SEE ALSO¶
BUGS¶
For suggestions, comments, bug reports etc. visit the project homepage.
2021-12-28 | swayimg |