.\" Swayimg: image viewer for Sway/Wayland .\" Copyright (C) 2021 Artem Senichev .TH SWAYIMG 1 2021-12-28 swayimg "Swayimg manual" .SH NAME swayimg \- lightweight image viewer for Wayland display servers .SH SYNOPSIS swayimg [\fIOPTIONS\fR]... \fI[FILE]...\fR .SH DESCRIPTION .PP If no input files or directories are specified, the viewer will try to read all files in the current directory. .PP Use '-' as \fIFILE\fR to read image data from stdin. .PP In a sway compatible mode, the viewer creates an "overlay" above the currently active window, which gives the illusion that you are opening the image directly in a terminal window. The program uses sway's IPC to determine the geometry of the currently focused workspace and window. This data is used to calculate the position and size of a new window. Then the program adds two rules to the sway application \fBswayimg\fR: "floating enable" and "move position". This creates a new Wayland window and draws an image from the specified file. .\" options .SH OPTIONS .IP "\fB\-h\fR, \fB\-\-help\fR" Display help message. .IP "\fB\-v\fR, \fB\-\-version\fR" Display version information and list of supported image formats. .IP "\fB\-o\fR, \fB\-\-order\fR\fB=\fR\fIORDER\fR:" Set the order of the image file list: .nf \fInone\fR: unsorted; \fIalpha\fR: sorted alphabetically (default); \fIrandom\fR: randomize list. .IP "\fB\-r\fR, \fB\-\-recursive\fR" Read directories recursively. .IP "\fB\-a\fR, \fB\-\-all\fR" Always open all files in the same directory. Even if you specify \fIFILE\fR as a path to some file (not a directory), \fBswayimg\fR will add all files in that directory to the image list. .IP "\fB\-l\fR, \fB\-\-slideshow\fR" Activate slideshow mode on startup. .IP "\fB\-m\fR, \fB\-\-mark\fR" Enable marking mode. Any file in the image list can be marked (see keybindings), and when the program exits, the list of marked files will be printed to stdout. .IP "\fB\-g\fR, \fB\-\-geometry\fR\fB=\fR\fIX,Y,WIDTH,HEIGHT\fR" Set the absolute position and size of the window. For example, \fI10,20,100,200\fR creates a window at position 10x20 (top left corner) with a size of 100x200. The comma can be replaced with any non-numeric character. If this parameter is not specified, the geometry of the currently focused window will be used. .IP "\fB\-b\fR, \fB\-\-background\fR\fB=\fR\fIXXXXXX\fR" Set background for transparent images: .nf \fInone\fR: transparent; \fIgrid\fR: show grid as background (default); .IP "\fB\-w\fR, \fB\-\-window\fR\fB=\fR\fIXXXXXX\fR" Set window background: .nf \fInone\fR: transparent (default); \fI#XXXXXX\fR: hexadecimal RGB color. .IP "\fB\-f\fR, \fB\-\-fullscreen\fR" Start in full screen mode. .IP "\fB\-s\fR, \fB\-\-scale\fR\fB=\fR\fISCALE\fR" Set the default scale of the image. \fISCALE\fR is one of the named values. \fIoptimal\fR: reduce the image to fit the window, but do not enlarge it; \fIfit\fR: reduce or enlarge the image to fit the window; \fIreal\fR: real image size (100%). .IP "\fB\-i\fR, \fB\-\-info\fR" Show image meta info (file name, size, EXIF, current scale, etc). .IP "\fB\-c\fR, \fB\-\-class\fR" Set a constant window class/app_id. Setting this may break the window layout. .IP "\fB\-n\fR, \fB\-\-no\-sway\fR" Disable integration with sway WM (window position management). .\" keys .SH KEYBINDINGS .IP "\fBArrows\fR and vim-like moving keys (\fBh\fR,\fBj\fR,\fBk\fR,\fBl\fR)" Move the view point. .IP "\fB+\fP, \fB=\fR" Zoom in. .IP "\fB-\fP" Zoom out. .IP "\fB0\fP" Set scale to 100%. .IP "\fBBackspace\fP" Reset position and scale to defaults. .IP "\fBF5\fP, \fB[\fP" Rotate 90 degrees anticlockwise. .IP "\fBF6\fP, \fB]\fP" Rotate 90 degrees clockwise. .IP "\fBF7\fP" Flip vertical. .IP "\fBF8\fP" Flip horizontal. .IP "\fBi\fP" Show/hide image properties. .IP "\fBf\fP, \fBF11\fP" Toggle full screen mode. .IP "\fBPgDown\fR, \fBSpace\fR, \fBn\fR" Open next file. .IP "\fBPgUp\fR, \fBp\fR" Open previous file. .IP "\fBN\fR" Open file from next directory. .IP "\fBP\fR" Open file from previous directory. .IP "\fBHome\fR, \fBg\fR" Open the first file. .IP "\fBEnd\fR, \fBG\fR" Open the last file. .IP "\fBF2\fR, \fBO\fR" Show previous frame. .IP "\fBF3\fR, \fBo\fR" Show next frame. .IP "\fBF4\fR, \fBs\fR" Start/stop animation. .IP "\fBF9\fR" Start/stop slideshow mode. .IP "\fBInsert\fR, \fBm\fR" Invert mark sate for current file. .IP "\fB*\fR, \fBM\fR" Invert mark sate for all files. .IP "\fBa\fR" Mark all files. .IP "\fBA\fR" Unmark all files. .IP "\fBEsc\fP, \fBEnter\fP, \fBF10\fP, \fBq\fP" Exit the program. .SH ENVIRONMENT .IP \fISWAYSOCK\fR Path to the socket file used for Sway IPC. .\" related man pages .SH SEE ALSO swayimgrc(5) .\" link to homepage .SH BUGS For suggestions, comments, bug reports etc. visit the .UR https://github.com/artemsen/swayimg project homepage .UE .