You are not logged in.
I'm using dwm, what WM do you use?
Offline
Offline
The quiet (-q) option isn't working here. Can anyone else confirm that?
Offline
echinus, which is based on dwm i believe.
Based on, but no longer resembling to. That's a big difference concerning issues like this
If you can't sit by a cozy fire with your code in hand enjoying its simplicity and clarity, it needs more work. --Carlos Torres
Offline
The quiet (-q) option isn't working here. Can anyone else confirm that?
Seems to work for me:
$ sxiv -fs *
sxiv: warning: could not open image: 09.txt.lrz
$ sxiv -fsq *
$
Offline
Thanks for the feedback, karol. I just found a post from ber_t saying that -q does not suppress libpng warnings and the like because he apparently cannot control them.
Offline
Thanks for the feedback, karol. I just found a post from ber_t saying that -q does not suppress libpng warnings and the like because he apparently cannot control them.
Can you please post a link to that post? I can't seem to find it.
Edit: Nwm, found it: https://bbs.archlinux.org/viewtopic.php … 41#p885741
In this case you can redirect stderr to a file or /dev/null.
Last edited by karol (2013-09-09 14:04:31)
Offline
In this case you can redirect stderr to a file or /dev/null.
Ugh.. Why did I not think of this? A thousand thanks.
Offline
i can't seem to get images to fit to the window, the -d option does nothing, and different -z values are also not useful.
this was solved by setting the master tiling window area to one window instead of two.
Offline
Hi. I've just registered to let you know what a fantastic program SXIV is. I've been converted from Feh and I love it. I also like that you are keeping it as simple as possible. It's great for large folders on old hardware. The thumbnails are slick. It's fast. Efficient animated GIF handling and image quality is top notch. It does everything I need and not much of what I dont.
I've one idea though
I use cmus (C*music) and it has this cool extra program that it listens to: cmus-remote. You can use this to send a new file to cmus, to pause it, to get the status
I'd like to be able use SXIV as a preview window with ranger and a sxiv-remote could work here. Perhaps all we really need is a flag on initial launch which sets it to single instance mode and not to steal focus in that mode.
This may be outside what you want to do, just putting the idea out there.
Also, I've removed the rotation options and recompiled. I know they are lossless, but they make my images fail md5 verification and there is no confirmation to write to the file. With the mouse wheel set to advance images I am in heaven. I just need to know how to setup the Esc key to exit.
Finally, thank you for you efforts.
Offline
Offline
I've one idea though
I use cmus (C*music) and it has this cool extra program that it listens to: cmus-remote. You can use this to send a new file to cmus, to pause it, to get the status
I'd like to be able use SXIV as a preview window with ranger and a sxiv-remote could work here. Perhaps all we really need is a flag on initial launch which sets it to single instance mode and not to steal focus in that mode.
This may be outside what you want to do, just putting the idea out there.
Can you elaborate a bit more? What exactly do you want to do and how it relates to cmus?
Offline
cmus-remote can control cmus in a lot of ways. It can send a play-pause, change the volume etc. You can then bind these commands to global hotkeys, so I have a play/pause key and I don't have to bring the window up
The most straightforward use for sxiv would be
sxiv-remote FILENAME
and that would send the file to the running instance of sxiv. So I could browse with ranger and send the selected file to sxiv, using it as a preview window.
Of course there are other ways to achieve this. You could have a flag that set that window to be the single instance receiver. Used without the flag it would open a second window as before, but with the flag set it would target the receiver instance with the new file. If that makes sense.
Offline
surely ranger's built-in image previews serve that purpose?
Ooh, I don't know how to do that.
Offline
surely ranger's built-in image previews serve that purpose?
This is very hacky though, it's using w3m to display images, doesn't work with all terminals, and is unpredictable.
Offline
dgz wrote:surely ranger's built-in image previews serve that purpose?
Ooh, I don't know how to do that.
you need to set preview_images true and set draw_borders true in ~/.config/ranger/rc.conf. you also need the optional w3m dependencies installed, and to be running ranger without tmux in urxvt or xterm.
This is very hacky though, it's using w3m to display images, doesn't work with all terminals, and is unpredictable.
it seems to work consistently enough for me once it's set up. but it is far from a stable solution.
Offline
@dgz
If you don't want to set it permanently in your rc file can activate it by pressing:
zp
So if you want to speed up file navigating, you can activate the preview function on demand.
Offline
Here's two things I do with sxiv that I wanted to share as ideas. Also, I'd like comments on how I can do them better.
1) I like to browse through a folder and mark images for deletion with ctrl-d. I've done this in config.h with:
{ true, XK_d, it_shell_cmd, (arg_t) \
"mv \"$SXIV_IMG\" \"$SXIV_IMG\"--mk4del" },
I can then delete them from the commandline with a wild card. Or do sxiv *--mk4del to review my decisions. The tag stops them being shown if I have another search through (I used the filemanager launch script mostly and it ignores these files). I'm considering prefixing as it groups them conveniently and gets around issues with the .jpg suffix but
{ true, XK_d, it_shell_cmd, (arg_t) \
"mv \"$SXIV_IMG\" mk4del--\"$SXIV_IMG\"" }, /*DOESN'T WORK*/
does not work, it prefixes the path. Help!
2) I like to take my favourite images for a favourites folder. I use hardlinks for this
{ true, XK_f, it_shell_cmd, (arg_t) \
"ln \"$SXIV_IMG\" \"$SXIV_IMG\"--lnkfav" },
I can then move these files to my chosen directory. I don't do it directly as I may have a lot of clashing filenames in there and I don't want to compile in the target directory anyway. I thought about appending a date and time or some other way to create a unique filename, perhaps using the parent dir name, but it wouldn't be universal and it wouldn't get over needing to compile the target dir in to make it a one hit process.
I hope this is of some use.
Last edited by robertpeston (2013-10-24 19:59:18)
Offline
Here's two things I do with sxiv that I wanted to share as ideas. Also, I'd like comments on how I can do them better.
1) Write a little script using sed or awk. This does the trick (I tested it on a few files but be sure to test it too, moving files around in an unexpected way could have nasty consequences).
#!/bin/bash
mv "$1" "$(echo $1 | sed 's/\([^/]\+\)$/m4del-\1/')"
2) You should only use hardlinks in extreme cases where no other trickery works. If you're really set on it, I recommend using a marking system or moving them to a separate "marked" folder.
As for giving them unique names in a certain directory: Again, write a script. There are numerous ways to solve this. Perhaps the easiest way is to number all the files in the directory.
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? The majority of GIFs I potentially want to view in sxiv are much better if looped. I'm fairly sure that the GIFs I view aren't any different from GIFs the majority of people find on the internet. I'm sure that having GIF looping enabled by default will benefit more people than having it disabled.
I didn't see a reply to this. I also think it makes more sense to loop multiframe images by default. Making it optional via the UI would be nice too.
I quickly tried to bind ctrl+r to toggle looping, but converting GIF_LOOP to a global and toggling it with a function had no effect (even though the value was changing). Given the reliance on enums in the config file I concluded that my approach was incorrect and I did not pursue it further.
My Arch Linux Stuff • Forum Etiquette • Community Ethos - Arch is not for everyone
Offline
Thanks for the feedback
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.
2) You should only use hardlinks in extreme cases where no other trickery works
They allow me to leave the files where they are, but still have a 'best of' directory without using any extra space. Is there a problem with the way I want to use them?
Offline
Perhaps sxiv could flush the input buffer so that it stops advancing to the next picture when you release the key. Ranger has this option in its configuration and it works well.
Edit: apologies, it does appear to do this with key input. Where is doesn't is 'advance on mouse wheel', and I added this in config.h.
Last edited by robertpeston (2013-11-17 12:27:28)
Offline
May I ask if it is possible to bind two mouse keys as single keybind? (Actually the config.h file suggests it is not possible, but anyway..)
My use case would be to zoom in/out using right button pressed and using the wheel.
Is there a hack to make continuous cycle (i.e. the first image follows the last.)?
Offline
Thumbnailing (or loading from cache) should start from the current image.
Offline
sxiv is a fantastic program. I love the fact that you can configure your own shortcuts.
It also works well with other scripts or applications. I am currently working on a personal application that uses extended attributes to tag and describe images, which can then be searched.
Here is a Python snipped that connects with sxiv:
#
# NOTE:
# finder.count() returns the number of found images
# finder.items is a list of absolute paths for images
#
if finder.count() > 0:
sxiv_call = ['/usr/bin/sxiv', '-b', '-d', '-f', '-p', '-t']
for i in finder.items:
sxiv_call.append(i)
from subprocess import call
call(sxiv_call)
Works like a charm, and with cached thumbnails it's even faster.
Offline