Home | About me | Miniblog | Playground
Español | Italiano
Published January 16, 2023

mage - image viewer

singleview

Wait for version 1.0 This program isn’t ready yet

About

What is image you say? an X image viewer trying to be simple, it’s about 1/6 the size of the current nsxiv.

nsxiv

mage tries to be suckless, tries because it forces a depencency: imlib2. Let’s be honest tho, imlib2 it’s like the xlib for images, most other programs require it (like scrot and other image viewers like feh) so you probably have it installed already.

Original sxiv and current nsxiv are confusing to develop, imo. It reads Xresources and user scripts by default, not something I’m a fan of, just because it’s hardcoded. It is more minimal than the alternatives like imv or feh, which even sets the wallpaper. But we can go even deeper, and that’s where mage appears. Nonetheless, sxiv, and specially the former, nsxiv, is a great image viewer that I myself still continue to use, at least my version mentioned below.

I first failed misserably trying to debloat sxiv. Then I say:

Fuck it, let’s make one from scratch.

Had to learn about libx11 calls and namings (and still learning), how suckless do stuff and even more painfuly: think by myself how the images are gonna work. I do ste… got some ideas from sxiv which I didn’t bother changing. I’m sure it can be made even simpler tho.

Thoughts

imlib2 doesn’t use the CPU. Been thinking about using sdl for performance reasons.

TODO

Finnish thumbnail view

remove bloat user functions

like cyclescalemodes

merge everything into mage.c

both cmd.c and image.c

add a function util to load images

with proper error code warnings support

claim victory

make awesome patches

This work is licensed under CC-BY-SA 2.0, unless specified otherwise. Year: 2022