SWAYIMG(1)
π SWAYIMG π
okay bestie, pull up a chair, we're talking about swayimg β that's the star of the Swayimg manual, and she's an image viewer for Wayland/DRM with Lua scripting support. yes. Lua. scripting. she's got range. π¦
β¨ NAME β¨
swayimg β image viewer for Wayland/DRM with Lua scripting support. that's the whole vibe. short, sweet, absolutely iconic. π
πΈ SYNOPSIS πΈ
swayimg [OPTION]... [FILE]...
so here's the tea: if you don't hand her any input files or directories, she'll just try to read all the files in the current directory. she's nosy like that. no cap. π
- use
-as FILE to read image data from stdin. yes, pipe it straight in, she'll take it. π«Ά - use the prefix
exec://to get image data from stdout printed by an external command. she'll run it and slurp up whatever comes out. iconic behavior fr fr.
π DESCRIPTION π
Swayimg is a lightweight Wayland-native image viewer optimized for the Sway and Hyprland window managers. and likeβ¦ she's got an overlay mode that simulates terminal image display?? the way that works is genuinely so cool. π
she supports slideshow and gallery modes, reads from stdin and external commands, and is highly customizable via Lua scripting. she's giving main character energy, honestly. π₯
π OPTIONS π
every single one. no skipping. we don't do that here. π
-h,--helpβ Display help message and exit. the "who are you and what do you want" flag.-V,--versionβ Display version information and list of supported image formats. she'll tell you everything she can read. flex. β¨-v,--viewerβ Force start in viewer mode.-g,--galleryβ Force start in gallery mode.-s,--slideshowβ Force start in slideshow mode.-f,--from-file=FILEβ Load file list from text FILE.-P,--position=X,Yβ Set initial position of the window (Sway/Hyperland only). yep, that's what it says. π-S,--size=W,Hβ Set initial size of the window.-F,--fullscreenβ Start in full screen mode. cinema. π¬-c,--config=FILEβ Load the specified Lua FILE instead of default one.-e,--execute=LUAβ Execute the specified Lua script after loading the configuration.--appid=IDβ Set application Id.--verboseβ Enable verbose output. she will NOT stop talking and honestly? we love that for her. π£οΈ
β¨οΈ KEYS β¨οΈ
π Viewer and Slideshow
Esc: Exit from applicationEnter: Switch to gallery modes: Enable/disable to slideshow modeInsert: Mark/unmark currently displayed imageDelete: Skip image (remove from the image list)f: Enable/disable full screen modea: Enable/disable anti-aliasing]: Rotate the image 90 degrees clockwise[: Rotate the image 90 degrees counterclockwisem: Flip image verticallyShift-m: Flip image horizontallyt: Show/hide text info layerPgDown: Show next imagePgUp: Show previous imageShift-PgDown: Show next frameShift-PgUp: Show previous frame+: Zoom in-: Zoom outLeft/Right/Up/Down: Move around the imageBackspace: Reset scale and image position to defaults
Mouse bindings:
ScrollUp/ScrollDown/ScrollLeft/ScrollRight: Move imageCtrl-ScrollUp: Zoom inCtrl-ScrollDown: Zoom outMouseLeft: Move image (drag)MouseRight: Drag-and-drop image to external applications
π¦ Gallery
Esc: Exit from applicationHome: Select first thumbnail in image listEnd: Select last thumbnail in image listLeft: Select the thumbnail to the left of the current oneRight: Select the thumbnail to the right of the current oneUp: Select the thumbnail above the current oneDown: Select the thumbnail below the current onePgUp: Select the thumbnail on the previous pagePgDown: Select the thumbnail on the next pageEnter: Switch to viewer modes: Switch to slideshow modeInsert: Mark/unmark currently selected imageDelete: Skip image (remove from the image list)f: Enable/disable full screen modea: Enable/disable anti-aliasing+: Increase thumbnail size-: Decrease thumbnail sizet: Show/hide text info layer
Mouse bindings:
MouseLeft: Open currently selected image in viewerMouseRight: Drag-and-drop image to external applicationsCtrl-ScrollUp: Increase thumbnail sizeCtrl-ScrollDown: Decrease thumbnail sizeScrollUp/ScrollDown/ScrollLeft/ScrollRight: Select next image
π ENVIRONMENT π
the vibes she reads from the air around her. π¬οΈ
SWAYSOCKβ Path to the socket file used for Sway IPC.HYPRLAND_INSTANCE_SIGNATURE,XDG_RUNTIME_DIRβ Path to the socket file used for Hyprland IPC.XDG_CONFIG_HOME,XDG_CONFIG_DIRS,HOMEβ Prefix for the path to the default application config file.SHELLβ Shell used for executing an external command and loading an image from stdout.
β‘ SIGNALS β‘
SIGUSR1,SIGUSR2β Perform the actions specified in the config file. so you can poke her from the outside and she'll do the thing. π«°
π EXIT STATUS π
The exit status is 0 if the program completed successfully and 1 if an error occurred. Other codes can be specified via Lua script. so like, slay, but also you can script your own exit codes. she trusts you. π
β EXAMPLES β
Viewing multiple files:
swayimg photo.jpg logo.png
Displaying an image received via a pipe:
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"
look at that. two external commands. two different tools. same penguin. π§β¨
πΈ FILES πΈ
The application searches for and processes the init.lua file at startup. The file is a Lua script that sets initial parameters, adds hooks and changes the behavior of the program. so she's literally a whole customizable girlie. π
Possible file locations:
$XDG_CONFIG_HOME/swayimg/init.lua$HOME/.config/swayimg/init.lua$XDG_CONFIG_DIRS/swayimg/init.lua/etc/xdg/swayimg/init.lua
π BUGS π
For suggestions, comments, bug reports, etc. visit the project homepage https://github.com/artemsen/swayimg. she's not mad, she's just disappointed. no wait β she's not even disappointed, she wants to hear from you. bestie behavior only. π«Ά
okay so this is the part where I remind you: the manual isSWAYIMG(1), it's theSwayimg manual, and this whole thing is fromswayimgdated2026-03-08. mwah. go look at some pictures. πβ¨ππ¦πΈπ
π¦ where this page comes from
- arch rolling: swayimg 5.7-1 Β· MIT
- fedora 44: swayimg 5.6-1.fc44 Β· MIT
- nixpkgs unstable: swayimg 5.7
- ubuntu stonking: swayimg 5.5-1 Β· MIT
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms