msxiv is a lightweight, Zathura-like image viewer inspired by sxiv, using ImageMagick as a backend.
It should support all formats that imagemagick display supports.
I generated most of the codebase with o1. Use with caution. Hillarity may ensue.
- X11 development libraries (
libX11,libXext,libXfixes) - ImageMagick development headers
- CMake and make
nix develop
cmake -B build
make -C buildcmake -B build
make -C build
sudo make -C build installThis installs msxiv to /usr/local/bin/msxiv.
msxiv image1.jpg image2.png ...- Next Image:
Space - Previous Image:
Backspace - Gallery Mode:
Enter - Zoom In/Out:
+/-orCtrl + Mouse Wheel - Pan:
WASDor Arrow Keys - Fit-to-Window:
= - Command Mode:
:(e.g.,:save ~/output.png) - Quit:
q
Configuration is loaded from:
~/.config/msxiv/config.toml
bg_color = "#000000" # Background color
keybindings = {
quit = "q",
next = "space",
prev = "backspace",
zoom_in = "+",
zoom_out = "-",
fit_window = "=",
gallery = "enter",
command = ":",
}
bookmarks = {
"wallpapers" = "~/Pictures/Wallpapers",
"saved" = "~/Pictures/Saved"
}- You can remap keys to commands or external shell commands.
- Use
exec <command>to run a shell command, with%sas a placeholder for the current image filename.
Example:
keybindings = {
delete = "d",
custom = "exec mv %s ~/Trash"
}-
:save <path>
Save the image to the specified path. If<path>is a directory, save it there with the original filename. -
:convert <target>
Convert and save the image in the specified format. E.g.,:convert output.jpg -
:delete
Delete the current image. -
:bookmark <label>
Save the image to a directory defined inconfig.tomlunder[bookmarks].
Press Enter to open the gallery when viewing multiple images.
- Navigate: Arrow Keys
- Open Selected:
Enter - Exit Gallery:
Escape