MCPcopy Create free account
hub / github.com/artemsen/swayimg

github.com/artemsen/swayimg @v5.4

Chat with this repo
repository ↗ · DeepWiki ↗ · release v5.4 ↗ · + Follow
2,163 symbols 4,995 edges 121 files 578 documented · 27% updated 4d agov5.4 · 2026-06-21★ 68110 open issues

Browse by type

Functions 1,615 Types & classes 548
What it actually does AI analysis from the code graph — generated when you open this
loading…
README

Swayimg: image viewer for Wayland and DRM

Swayimg is a fully customizable image viewer with Lua scripting support.

  • Support for the most popular image formats:
  • JPEG (via libjpeg),
  • JPEG XL (via libjxl);
  • JPEG 2000 (via OpenJPEG);
  • PNG (via libpng);
  • GIF (via giflib);
  • SVG (via librsvg);
  • WebP (via libwebp);
  • HEIF/HEIC (via libheif);
  • AV1F/AVIFS (via libavif);
  • TIFF (via libtiff);
  • Sixel (via libsixel);
  • Raw: CRW/CR2, NEF, RAF, etc (via libraw);
  • EXR (via OpenEXR);
  • TTF/OTF fonts preview (via FreeType);
  • BMP (built-in);
  • PNM (built-in);
  • TGA (built-in);
  • XBM (built-in);
  • QOI (built-in);
  • DICOM (built-in);
  • Farbfeld (built-in).
  • Native support for Wayland and DRM output;
  • Gallery and viewer modes with slideshow;
  • Image animation support;
  • EXIF, XMP and IPTC tags support;
  • Loading images from files, pipes and external programs;
  • Preload images in a separate thread;
  • Support for the Sway and Hyprland window managers, including an overlay feature that simulates displaying an image in the currently active window (e.g. a terminal);
  • Fully customizable keyboard bindings, colors, and many other parameters via Lua bindings.

Viewer mode Gallery mode

Usage

swayimg [OPTIONS]... [FILE]...

Examples: - View multiple files: swayimg photo.jpg logo.png - 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"

See full documentation for details.

Configuration

The Swayimg configuration file is a Lua script. The full list of available functions is described in the documentation and in the Lua source file.

Example of the configuration file is available after installation in /usr/share/swayimg/example.lua.

Install

Packaging status

List of supported distributives can be found on the Repology page.

Arch users can install the program from the extra repository or from AUR package.

Build

The project uses Meson build system:

meson setup my_build_dir
meson compile -C my_build_dir
meson install -C my_build_dir

Core symbols most depended-on inside this repo

Shape

Method 1,246
Class 517
Function 369
Enum 31

Languages

C++99%
Python1%

Modules by API surface

src/external/json/json.hpp601 symbols
src/external/luabridge/detail/Stack.h163 symbols
src/external/luabridge/detail/Expected.h76 symbols
src/ui_wayland.cpp75 symbols
src/external/luabridge/detail/LuaRef.h75 symbols
src/external/luabridge/detail/Userdata.h74 symbols
src/external/luabridge/detail/CFunctions.h74 symbols
src/external/luabridge/detail/FuncTraits.h57 symbols
src/viewer.cpp39 symbols
src/external/luabridge/detail/Namespace.h39 symbols
src/external/luabridge/detail/LuaHelpers.h37 symbols
src/gallery.cpp36 symbols

For agents

$ claude mcp add swayimg \
  -- python -m otcore.mcp_server <graph>

⬇ download graph artifact

Ask about this repo answers extend the page