You are not logged in.
Is it possible to make sxiv read images from the standard input? Feh can do it, I think it's a pretty useful feature.
I actually found a use case for this (for me). mutt can pipe mail attachments to a program and this way you could use sxiv to open an attached image without having to download it to your hd. So I think I second this suggestion.
Offline
I have a little problem, I can't seem to find a solution for.
The file ~/.sxiv/exec/key-handler is not executed by sxiv.
I tested with ratpoison and xfce4 but it did not work with either.
(The script is executable and works when invoked from cli)
I would appreciate any help!
Offline
* feh replacement
* in [community]
* supports disabling of AA and alpha channel
* supports animation
* switchable thumbnail mode.
Oh hell yes.
The only thing I miss here is cursor-key navigation for non-thumbnail mode. And actions. I miss actions (but it looks like maybe I can implement something similar?)
Offline
You can assign keybindings to commands e.g. https://wiki.archlinux.org/index.php/Sx … ts_to_sxiv
Offline
you can also add cursor keybindings by compiling sxiv yourself and customising config.h (see here for more details). just use the AUR version and stick a command to edit config.def.h in there somewhere after the git checkout and before the make statements.
the one thing i'd like to see is xft support, which it looks like somebody has already added in a personal fork.
Last edited by shmibs (2014-01-08 05:29:39)
[site] | [dotfiles] | あたしたち、人間じゃないの?
Offline
Thank you, that is quite excellent.
* I can implement 'secondary' keybinds like that with xdotool (for someone on Colemak kbd layout with no caps lock, repeatedly shift+d to delete consecutive images from the list is a bit much)
* I could also implement 'go to random' command, except that sxiv seems to clip at the ends (eg. '694<Space>' in a 100-image list just goes to the 100th image, and the only way I have to know the filelist length is pregenerate the filelist.).
* This behaviour seems reasonable for the 'next image/prev image' commands, but it also occurs for the 'goto image #' command. Could that be changed so that it goes to image # [input number modulus image list length]?
* Having a button binding by default for Shift+Button1 to go to prev image would help a lot, as a tablet user. Button1 is very easy and painless to hit in rapid succession Button3 is not as easy (more like tapping a keyboard key)
* Playing animated files cancels the rotation for the duration of the animation. Stepping through the animation destroys the rotation state (reset to 0 degrees). EDIT: ber_t promptly fixed this in recent Git
I also wanted to mention other things that impressed me:
* Performance in thumbnail mode. Generating new thumbnails at a good rate, consistently low memory usage, even when I throw a 50000 image list at it
* Statusbar is very readable, esp. compared to feh.
* The way you can combine keyboard commands with mouse commands made me grin.10<Button1>, yes!
* Transform (rotate, flip) working on view rather than file. I'll still use Feh's file transforms to normalize the orientation of my scans and photos, but for everything else, view transforms are 100% the way to go!
* Frame-by-frame animation navigation is invaluable.
* Animation playing without eating stupid amounts of ram. (for some reason, other programs seem various degrees of incompetent at accomplishing this task. They try to expand each frame into an RGB(A) image with no transparency, perhaps?)
* Thumbnail navigation is just 100% less confusing than feh.
I have more feedback, but this will do for now
Last edited by likytau (2014-01-10 12:07:25)
Offline
My keyhandler script works now, I just had to install the sxiv-git from AUR.
Offline
I just noticed it's not possible to use the following settings together:
{ false, XK_Right, i_navigate, (arg_t) +1 }, { false, XK_Left, i_navigate, (arg_t) -1 }, { false, XK_Left, it_scroll_move, (arg_t) DIR_LEFT }, { false, XK_Right, it_scroll_move, (arg_t) DIR_RIGHT },
Even though they do not occur in the same environment and *could* be used, the first works while the second does not.
Could it be this just requires an easy fix?
This should be fixed by commit https://github.com/muennich/sxiv/commit … 0b8cd66e5a.
Last edited by ber_t (2014-01-09 19:48:11)
Offline
Is it correct the slideshow option has been removed?
The old slideshow code was removed quite some time ago. There's a new version introduced a couple of days ago by this commit: https://github.com/muennich/sxiv/commit … bfcdf782cf
Last edited by ber_t (2014-01-09 21:53:58)
Offline
Shall I post here some features wishes ? Well, I hope so... ;-)
1) Exif information view.
Note: Apparently this is already available in version 1.1, thanks for that, but only 1.0-3 is available at the moment in [Community] thus I haven't tested it yet.
In the new "exec/key-handler" example script there's a handy command to open a new terminal with the full EXIF tag content; bound to Ctrl-e.
2) Easier customization with .config/sxivrc file instead of config.h.
Not coming.
3) * Last but not least! *
Interactive (that means with file name completion) 'open file' command, like vim's ':edit' or zathura's ':open'.
Not coming, too.
Offline
ber_t: I really like your image viewer but I have one question - is there an obstacle preventing the GIF loop feature from being enabled by default? [...] I'm sure that having GIF looping enabled by default will benefit more people than having it disabled.
It benefits me to turn it off by default.
If I would make endless looping the default behaviour I would therefore disable autoplaying by default.
Last edited by ber_t (2014-01-09 20:35:08)
Offline
@karol: The authors made a great job building sxiv. Do you really think that they want to force sxiv users to launch it only the two first ways I mentionned and not the third one? I can't imagine any reason why they would...
Save a lot of time by not implementing quite complex features they do not need?
Offline
Is it possible to make sxiv read images from the standard input? Feh can do it, I think it's a pretty useful feature.
The Imlib library does not support loading images from memory. So sxiv would have to create a file, fill it with the data from stdin, make Imlib read this file and then delete it. I think that this can be more easily achieved by a simple shell script wrapper.
Offline
I just need to know how to setup the Esc key to exit.
This is not possible, because the Escape key is hardwired to reset the count prefix.
Offline
Thanks for the feedback
doggone wrote:1) Write a little script using sed or awk.
And then call this script by modifying config.h? As you say, there seems to be the possibility of that script going wrong (perhaps I'm just a nervous SED newbie). I wanted to keep it as simple as possible. Shame that SXIV doesn't have separate variables for path and filename.
I think that what you try to do is now pretty easy thanks to the new "exec/key-handler" script, which replaces the old "it_shell_cmd" and "it_open_with" commands.
Offline
Thumbnailing (or loading from cache) should start from the current image.
This is by design. Starting at the current image would make it impossible to achieve the same stability of the grid. I do not like the thumbnails to shift around when the ones above the current one get loaded.
Offline
* I could also implement 'go to random' command, except that sxiv seems to clip at the ends (eg. '694<Space>' in a 100-image list just goes to the 100th image, and the only way I have to know the filelist length is pregenerate the filelist.).
Could this not be achieved by two random numbers, the first for an amount of forward moves and the second for subsequent backward moves?
* Transform (rotate, flip) working on view rather than file. I'll still use Feh's file transforms to normalize the orientation of my scans and photos, but for everything else, view transforms are 100% the way to go!
You could also use the lossless jpegtran commands in "exec/key-handler" for this.
Offline
ber_t I love your work, but please use the edit button for multiple replies, rather than individual posts...
Also, thanks for being so staunch about "feature" creep: sxiv is very cool.
Offline
likytau wrote:* I could also implement 'go to random' command, except that sxiv seems to clip at the ends (eg. '694<Space>' in a 100-image list just goes to the 100th image, and the only way I have to know the filelist length is pregenerate the filelist.).
Could this not be achieved by two random numbers, the first for an amount of forward moves and the second for subsequent backward moves?
I considered that. The reason that doesn't work is that the first move can hit the end of the list followed by the second one hitting the start of the list. As long as the command either a) has no knowledge of the length of the filelist, or b) can't access a command which goes N images through the list without wrapping, it is not mathematically possible. The most randomness reliably achievable with those constraints is .. 'randomly either go to next image or prev image'. Which is not useful
Thanks for the point about key-handler, I haven't checked out what's in that yet.
The key-handler design really, really impresses me BTW. The epitome of clean modular software design.
Last edited by likytau (2014-01-10 12:22:16)
Offline
I'm still having trouble getting key-handler to work.
I git clone the repo and compile it; I create a folder "sxiv" in my home directory, and place "/exec/key-handler" in it. None of the keybindings seem to register at all. C-c doesn't copy the image filename, for example, to xsel. I've checked twice: the script is executable.
Any ideas?
Character shines in the great moments, but is polished in the little ones.
Offline
grep -i example .config/sxiv/exec/key-handler
# Example for $XDG_CONFIG_HOME/sxiv/exec/key-handler
Offline
grep -i example .config/sxiv/exec/key-handler # Example for $XDG_CONFIG_HOME/sxiv/exec/key-handler
Thanks. I hit myself in the face with a baseball bat after seeing this. I guess my sleep deprived eyes only saw "HOME".
Problem solved. Muchos gracias.
Character shines in the great moments, but is polished in the little ones.
Offline
is it possible to set horizontal fit as default in config.h or (even better) via a startup option.
this is useful for viewing manga and comics.
Offline
@dgz, is
static const scalemode_t SCALE_MODE = SCALE_FIT;
doing what you want?
Offline
would that not fit the entire image, horizontally and vertically, to the window? i believe i have that set already. i want a horizontal fit, as in pressing 'e', by default.
Offline