You are not logged in.
Because there are at least five Archers out there, who always enjoy a mouse-less workflow and whose mail address I don't have, it seems to be the best way to just announce it here...
I was kind of unsatisfied with feh and qiv, because they either depend on gtk, don't work well with tiling window managers and/or have a code base that's too big and complex to easily change them to fit my needs.
So two weeks ago I started writing my own. It's called sxiv -- which stands for simple or small or suckless x image viewer -- and can be found at GitHub and in the AUR (EDIT: there's also a sxiv-git version, thanks to Army).
It's not finished yet, but I think it's already pretty useful.
Last edited by ber_t (2011-08-16 23:23:02)
Offline
/me scratches head
Why is it running as root? I have built it the way I always do with AUR ...
Don't know if it helps:
[karol@black ~]$ ps -C sxiv -o euser,ruser,suser,fuser,comm
EUSER RUSER SUSER FUSER COMMAND
root karol root root sxiv
They should all read 'karol'.
Am I dong something wrong?
From https://github.com/muennich/sxiv
Please note, that the latter one requires root privileges. By default, sxiv is installed using the prefix "/usr/local", so the full path of the executable will be "/usr/local/sbin/sxiv".
Why is it 'sbin/sxiv' and not 'bin/sxiv'?
The package from AUR installs to /usr/bin/sxiv anyway.
Last edited by karol (2011-01-30 02:36:51)
Offline
/me scratches head
Why is it running as root? I have built it the way I always do with AUR ...
The makefile installs the executable setuid root. I can't think of any reason why an image viewer requires root privileges. No thanks.
Offline
Is changing
install -D -m 4755 -o root -g root sxiv $(PREFIX)/bin/sxiv
to
install -D -m 755 sxiv $(PREFIX)/bin/sxiv
all that I need to do? Seems to work that way.
Offline
Sweeeeet. I like how it preloads everything you throw at it. Makes going through images afterwards really fast.
Is there a way to suppress warnings (-q), such as
libpng warning: Buffer error in compressed datastream in iCCP chunk
and
sxiv: image.c:66: warning: could not open image: ./testing/hurrdurr
?
Maybe change the background color from grey (on demand maybe)?
(Currently I set -f on XMonad with sxiv instances set to always float)
Ctrl+ScrollUp/Down not working for me.
Last edited by MadCatMk2 (2011-01-30 10:52:43)
Offline
Changing the background colour is as easy as modifying the value in config.h and running make. Done.
I've issues with keys: most don't work at all, except for 'a', '+', '-', '=', '<', '>', as well as zooming in/out with scrollwheel -- they're OK. The rest is dead as a doornail.
Besides, when using AwesomeWM, whenever I try to set the picture fullscreen, it only flashes for a split second and gets back to the default size. I can, however, switch it full screen with my WM, but not with sxiv itself.
:: Registered Linux User No. 223384
:: github
:: infinality-bundle+fonts: good looking fonts made easy
Offline
First of all, thanks for trying sxiv and giving your feedback...
The setuid bit in the Makefile and the "/usr/sbin" typo in the README are the consequences of simply taking both files from another project and not overlooking them very carefully. They make me look really foolish and I think I have just to live with that. Anyway, both of them got fixed with the 0.3.1 release, so please update, if you still want to use sxiv...
About the keys: I don't have an idea what's going wrong, yet. bohoomil, can you please confirm, that 'a' is working but 'n' and 'p' are not?
@bohoomil: The fullscreen bug in awesome wm -- and in potentially many other window managers, too -- is caused by the fact, that they do not support the the NET_WM_FULLSCREEN atom of the EWMH spec. I do not plan to add a hackish fullscreen mode like mplayer and other programs have, because I think, that toggling the fullscreen state of a window is the job of the window manager.
@MadCatMk2: The first warning isn't from sxiv itself, but from the libraries it uses (through imlib), so I can't do anything to make them go away. The second warning just says, that it cannot open a file you have given on the command line. They're absolutely intentional, but I might add an option flag to turn them off.
EDIT: Just an idea: can someone, having problems with the keys, try them with Numlock on and off, please?
Last edited by ber_t (2011-01-30 14:30:39)
Offline
Works great! thanks! (I'm using the git-version)
Probably replaces feh for me for imageviewing.
Offline
The setuid bit in the Makefile and the "/usr/sbin" typo in the README are the consequences of simply taking both files from another project and not overlooking them very carefully. They make me look really foolish and I think I have just to live with that. Anyway, both of them got fixed with the 0.3.1 release, so please update, if you still want to use sxiv...
Everyone makes a brown bag release now and then. Any plans to add the ability to set wallpaper?
Offline
@MadCatMk2: The first warning isn't from sxiv itself, but from the libraries it uses (through imlib), so I can't do anything to make them go away. The second warning just says, that it cannot open a file you have given on the command line. They're absolutely intentional, but I might add an option flag to turn them off.
EDIT: Just an idea: can someone, having problems with the keys, try them with Numlock on and off, please?
I understand the warnings are intentional, but here's what I was doing:
sxiv ./*
(in a directory with multiple types of images (.png's, .jpg's etc) instead of 'sxiv *.jpg *.png')
I just tried with caps lock on/off with to no avail.
Tested all the keys this time, the only ones not working are these:
Shift+ScrollUp Pan image left
Shift+ScrollDown Pan image right
Ctrl+ScrollUp Zoom in
Ctrl+ScrollDown Zoom out
while, for example, Ctrl+ScrollUp works in chromium, so it is not being grabbed my my WM (XMonad).
Also, sometimes the window goes crazy when resizing it or does not allow me to resize it at all. No errors in the command line. I could upload a video if you want to see.
Edit:
Changing the background colour is as easy as modifying the value in config.h and running make. Done.
That would definitely work but if we had an argument option it would be nice in the sense that, for example, you might have white documents in pictures, which are easier on the eyes with a white backdrop, or images with high contrast that look better with a black background.
Just an idea I've had for a long time on image viewers.
Last edited by MadCatMk2 (2011-01-30 14:59:12)
Offline
Any plans to add the ability to set wallpaper?
Well, I think I have to add this, otherwise one will often need another image viewer... Just added it to the TODO list.
(in a directory with multiple types of images (.png's, .jpg's etc) instead of 'sxiv *.jpg *.png')
Changed the behaviour in HEAD, new option -W to explicitly enable printing of warnings.
I just tried with caps lock on/off with to no avail.
No, not Caps-Lock but Numlock, please...
Also, sometimes the window goes crazy when resizing it or does not allow me to resize it at all. No errors in the command line. I could upload a video if you want to see.
Uploading a video would be really helpful, thanks.
Offline
Weird: I've installed it once again, and now everything's working as intended (both keyboard and mouse, including panning/zooming mentioned by MadCatMk2).
:: Registered Linux User No. 223384
:: github
:: infinality-bundle+fonts: good looking fonts made easy
Offline
falconindy wrote:Any plans to add the ability to set wallpaper?
Well, I think I have to add this, otherwise one will often need another image viewer... Just added it to the TODO list.
That would be awesome - I use feh and actually it does it well, but why should I use two image-viewers. I dont know any lightweight-app wich sets the wallpaper - and nothing more...
Offline
Woah. Numlock did it for Ctrl and Shift. I'll be testing -W once it's in AUR.
Excuse me for using youtube, http://www.youtube.com/watch?v=O-pYEueItJ4
Offline
I dont know any lightweight-app wich sets the wallpaper - and nothing more...
Imlibsetroot: http://aur.archlinux.org/packages.php?ID=40199
Offline
gorilla wrote:I dont know any lightweight-app wich sets the wallpaper - and nothing more...
Imlibsetroot: http://aur.archlinux.org/packages.php?ID=40199
Thanks!
Offline
Thanks alot for the nice contribution! I really like it alot and it's now my new image viewer of choise!
Thanks again, mate!
Offline
Because there are at least five Archers out there, who always enjoy a mouse-less workflow and whose mail address I don't have, it seems to be the best way to just announce it here...
I'm on of them! I've used it for 1.5 weeks and I like it. Keep it up!
Offline
@Gusar: Thanks for pointing to imlibsetroot. It seems nice and handles everything including dual monitors. And because I deeply honor the unix philosophy, I will not duplicate its functionality, so setting the wallpaper is not a real goal/todo anymore...
@MadCatMk2: What's shown in your video seems to be real weird. Is the window at the end strangely resized to consist only of its title bar, or is the whole window content just black?
Offline
@MadCatMk2: What's shown in your video seems to be real weird. Is the window at the end strangely resized to consist only of its title bar, or is the whole window content just black?
I don't have titlebars, only window borders. The image seems to be there if you look carefully (the white line).
Thing is, XMonad forces windows to take whatever size it want's them to in order to be able to tile them. I just noticed for example, that 'eog' has similar flickering behavior but does, ultimately, follow the cursor. I guess if people with other window managers don't have similar issues then it might as well not concern your project specifically.
Offline
@Gusar: Thanks for pointing to imlibsetroot. It seems nice and handles everything including dual monitors. And because I deeply honor the unix philosophy, I will not duplicate its functionality, so setting the wallpaper is not a real goal/todo anymore...
+1 imlibsetroot and sxiv replaced feh for me. :-)
Offline
I like it, alot. It works great, can't wait to see more features. Great work
Offline
Thanks a lot. My second favorite software by you (the first being urxvt-keyboard-select).
Registed Linux User 483618
Offline
+1 what Sara wrote
Regarding additional features, I hope you won't implement too many, this should stay a very lightweight application to show pictures.
There's one thing though I'd like to have:
When I open an image, it is being resized so it fits the screen size or the size of the application. As soon as I zoom into an image and want to go back to the original view, it's not possible to get back this previous zoom level. Could you implement that?
Offline
Thanks for thanking. This kind of drives open source development...
@Army: It's almost feature complete, release 1.0 is just around the corner and I'm not planning to add much more features... Regarding the size/zoom thing you've asked for: I don't exactly understand, what you mean. If it's something like the typical "fit image into window when I press this key", then I can appease you, it's already in the TODO list.
Offline