You are not logged in.
==> Starting build()... [40/110]
gcc -march=i686 -mtune=generic -O2 -pipe -fstack-protector-strong --param=ssp-buffer-size=4 -D_FORTIFY_SOURCE=2 -st
d=c99 -Wall -pedantic -O2 -I/usr/include -D_XOPEN_SOURCE=500 -DHAVE_LIBEXIF -DHAVE_GIFLIB -DVERSION=\"git-20140723\
" -c -o commands.o commands.c
gcc -march=i686 -mtune=generic -O2 -pipe -fstack-protector-strong --param=ssp-buffer-size=4 -D_FORTIFY_SOURCE=2 -st
d=c99 -Wall -pedantic -O2 -I/usr/include -D_XOPEN_SOURCE=500 -DHAVE_LIBEXIF -DHAVE_GIFLIB -DVERSION=\"git-20140723\
" -c -o image.o image.c
gcc -march=i686 -mtune=generic -O2 -pipe -fstack-protector-strong --param=ssp-buffer-size=4 -D_FORTIFY_SOURCE=2 -st
d=c99 -Wall -pedantic -O2 -I/usr/include -D_XOPEN_SOURCE=500 -DHAVE_LIBEXIF -DHAVE_GIFLIB -DVERSION=\"git-20140723\
" -c -o main.o main.c
In file included from main.c:43:0:
config.h:72:36: error: ‘it_quit’ undeclared here (not in a function)
{ 0, XK_q, it_quit, (arg_t) None },
^
config.h:73:36: error: ‘it_switch_mode’ undeclared here (not in a function)
{ 0, XK_Return, it_switch_mode, (arg_t) None },
^
config.h:74:36: error: ‘it_toggle_fullscreen’ undeclared here (not in a function)
{ 0, XK_f, it_toggle_fullscreen, (arg_t) None },
^
config.h:75:36: error: ‘it_toggle_bar’ undeclared here (not in a function)
{ 0, XK_b, it_toggle_bar, (arg_t) None },
^
config.h:77:36: error: ‘it_prefix_external’ undeclared here (not in a function)
{ ControlMask, XK_x, it_prefix_external, (arg_t) None },
^
config.h:79:36: error: ‘it_reload_image’ undeclared here (not in a function)
{ 0, XK_r, it_reload_image, (arg_t) None },
^
config.h:81:36: error: ‘it_remove_image’ undeclared here (not in a function)
{ 0, XK_D, it_remove_image, (arg_t) None },
^
config.h:90:36: error: ‘it_first’ undeclared here (not in a function)
{ 0, XK_g, it_first, (arg_t) None },
^
config.h:91:36: error: ‘it_n_or_last’ undeclared here (not in a function)
{ 0, XK_G, it_n_or_last, (arg_t) None },
^
config.h:97:36: error: ‘it_toggle_image_mark’ undeclared here (not in a function)
{ 0, XK_m, it_toggle_image_mark, (arg_t) None },
^
config.h:98:36: error: ‘it_reverse_marks’ undeclared here (not in a function)
{ 0, XK_M, it_reverse_marks, (arg_t) None },
^
config.h:99:36: error: ‘it_navigate_marked’ undeclared here (not in a function)
{ 0, XK_N, it_navigate_marked, (arg_t) +1 },
^
config.h:102:36: error: ‘it_scroll_move’ undeclared here (not in a function)
{ 0, XK_h, it_scroll_move, (arg_t) DIR_LEFT },
^
config.h:111:36: error: ‘it_scroll_screen’ undeclared here (not in a function)
{ ControlMask, XK_h, it_scroll_screen, (arg_t) DIR_LEFT },
^
config.h:158:2: error: initializer element is not constant
{ 0, 4, it_scroll_move, (arg_t) DIR_UP },
^
config.h:158:2: error: (near initialization for ‘buttons[3].cmd’)
config.h:159:2: error: initializer element is not constant
{ 0, 5, it_scroll_move, (arg_t) DIR_DOWN },
^
config.h:159:2: error: (near initialization for ‘buttons[4].cmd’)
config.h:160:2: error: initializer element is not constant
{ ShiftMask, 4, it_scroll_move, (arg_t) DIR_LEFT },
^
config.h:160:2: error: (near initialization for ‘buttons[5].cmd’)
config.h:161:2: error: initializer element is not constant
{ ShiftMask, 5, it_scroll_move, (arg_t) DIR_RIGHT },
^
config.h:161:2: error: (near initialization for ‘buttons[6].cmd’)
config.h:162:2: error: initializer element is not constant
{ 0, 6, it_scroll_move, (arg_t) DIR_LEFT },
config.h:162:2: error: (near initialization for ‘buttons[7].cmd’)
config.h:163:2: error: initializer element is not constant
{ 0, 7, it_scroll_move, (arg_t) DIR_RIGHT },
^
config.h:163:2: error: (near initialization for ‘buttons[8].cmd’)
Makefile:20: recipe for target 'main.o' failed
make: *** [main.o] Error 1
==> ERROR: A failure occurred in build().
Aborting...
I'll check if it's already been reported upstream.
Edit: Reported it https://github.com/muennich/sxiv/issues/153
Last edited by karol (2014-07-24 09:41:43)
Offline
karol, update your config.h
This silver ladybug at line 28...
Offline
To what?
I got sxiv-git from the AUR and it says it has recently updated the config.h. I'm not using any old code, old configs, I grabbed the taurball and tried to build it.
Edit: Does it work for you?
Edit2: src/sxiv/config.def.h works. Thanks :-)
Last edited by karol (2014-07-24 10:40:40)
Offline
I think AUR/sxiv-git shouldn't really ship a config.h ...
Actually I really wish there were a way (options/env/Xresources) to change the UI colors of sxiv at runtime, because those are the only things I change in config.h.
This silver ladybug at line 28...
Offline
I change the bar font to terminus and make the thumbnails big. Because I'm old.
Not a problem at all, I just got confused. Because I'm old.
See e.g. https://github.com/muennich/sxiv/issues … t-49748555 for 'I wish sxiv would let me' answer.
Offline
I change the bar font to terminus and make the thumbnails big. Because I'm old.
Oh, I also changed the font to fixed at size 12 instead of 13, because it's when it looks best to me. I agree thumbs may be a bit small; since I've just returned to using sxiv today, I'll see if I want to increase it as I go.
See e.g. https://github.com/muennich/sxiv/issues … t-49748555 for 'I wish sxiv would let me' answer.
Yeah, sounds like Bert to me. This comment gets it right for me: for all my needs, a simple key=value config file is enough. But maybe Bert does not like to have an half-assed config file, considering config.h is much more powerful.
This silver ladybug at line 28...
Offline
I agree thumbs may be a bit small; since I've just returned to using sxiv today, I'll see if I want to increase it as I go.
The funny thing is the thumbnails don't get rebuilt, so I got tiny pictures (literally thumb-sized) 2 inches apart :-)
I fixed it by removing the cached ones.
Offline
This comment gets it right for me: for all my needs, a simple key=value config file is enough. But maybe Bert does not like to have an half-assed config file, considering config.h is much more powerful.
You're the first one to get this right. I highly doubt that the mentioned "probably less than 100 line config parser" would offer the same possibilities than the current config.h, as long as it is written in C. And with config.h I do not have to care about backward compatibility whatsoever. If I break stuff while changing things for the better almost no one complains, because only a handful of people has to adapt their config.h files. Try the same with an ascii configuration file.
Offline
I think your approach is fine for your audience. Not everyone would feel as strongly against a config file as you, but most should understand and respect your stance.
Now a request for review from me . Note that my C is crap, as you will soon see . Anyway, I have put together whipped up a patch to add a key binding to toggle loop behavior of GIF images. Here's the code, http://ix.io/dys
I don't like the `#ifdef _GLOBAL_CONFIG` introduced by the patch, but I couldn't think of a better way to do it.
Do you like to include this feature in sxiv?
EDIT: updated patch: http://ix.io/dyV (fix cg_toggle_gif_loop that was causing seg faults when run on a non-GIF image).
EDIT: Got rid of global and _GLOBAL_CONFIG; now looking much more proper, http://ix.io/dzk
EDIT: I see Bert has removed GIF_LOOP altogether in commit 5e48191 so sxiv now does not care about what the GIF file says how many times to loop. I think it's a good direction to take. I'd like to think the motivation was from my patch here, which is now obsolete, albeit in a "push away" kind of way
Now the only thing left of my patch is this, to display frame delay in the info bar:
--- a/main.c
+++ b/main.c
@@ -379,6 +379,7 @@ void update_info(void)
n += snprintf(rt + n, rlen - n, "G%+d | ", img.gamma);
n += snprintf(rt + n, rlen - n, "%3d%% | ", (int) (img.zoom * 100.0));
if (img.multi.cnt > 0) {
+ n += snprintf(rt + n, rlen - n, "%ums ", img.multi.frames[img.multi.sel].delay);
for (fn = 0, i = img.multi.cnt; i > 0; fn++, i /= 10);
n += snprintf(rt + n, rlen - n, "%0*d/%d | ",
fn, img.multi.sel + 1, img.multi.cnt);
Last edited by lolilolicon (2014-07-26 06:31:40)
This silver ladybug at line 28...
Offline
Here, another patch where the idea is better than the code, http://ix.io/dyW
It allows toggling between two color schemes at runtime (bound to key c); no fancy default colors, but the idea is you will want a light color scheme and a dark one. Check it out
This silver ladybug at line 28...
Offline
The wiki says you have to use sxiv-git if you need key-handler, but sxiv 1.2 from the repos should handle it just fine, right?
The note was added back in January, before sxiv 1.2 https://wiki.archlinux.org/index.php?ti … did=291778
Offline
I made a patch to add a command that resizes the window to fit the image.
http://ix.io/dAH (pretty)
This is useful when you view a series of images that are of the same size, or at least aspect ratio.
As stated in the patch, there is a tiny quirk; any idea what is causing it, and any way to fix it?
Last edited by lolilolicon (2014-07-26 15:20:57)
This silver ladybug at line 28...
Offline
I'd like to bind Ctrl+D to delete files (calling "trash $FILE"). I've used key-handler for now, but I'd like to edit config.h in order to avoid having to press the prefix before doing this (mostly because it's a rather common action).
The best I've though of is having ctrl+d as a prefix as well, so ctrl+d twice trashes files.
Is this possible? Are there any plans to do this in future?
Offline
@hobarrera why not mark the files to be deleted and finally trash them all in one go?
This silver ladybug at line 28...
Offline
@hobarrera why not mark the files to be deleted and finally trash them all in one go?
How would you achieve that?
Offline
Are you on sxiv from git head, or the stable release? This funtionality was introduced in commit e267dc7 which isn't in a release yet.
This silver ladybug at line 28...
Offline
Here's a simple script I wrote to split a filelist into chunks and invoke sxiv -i on each chunk one by one.
It reads the filelist from stdin, and outputs information about it after every chunk has been viewed.
It has one parameter: the size of the chunks (default 256). You must specify this if you want to pass additional options to sxiv (all further arguments are passed verbatim to sxiv).
If you want to use it in conjunction with sxiv's -o option, be advised that the final line of the output will contain splitsxiv's stats. You can remove this easily using 'head -n -1', or parse it into a string 'NCHUNKS CHUNKSIZE TOTALFILES' using 'tail -1 | grep -Eo "[0-9]+"'
Known bugs:
* will crash if you pass the -v option to sxiv, as this causes sxiv to stop reading stdin. Solution: don't do that, it's silly and has no practical application.
Other:
* can be trivially modified to invoke sxiv synchronously, rather than serially (all instances start more or less at the same time). I don't have a use for this, but you might. Simply comment out the 'sxiv.wait()' line (and beware that having many instances open may take more memory than you were expecting.).
Offline
Here's a simple script I wrote to split a filelist into chunks and invoke sxiv -i on each chunk one by one.
Looks really useful, but that host seems down. Could you mirror that elsewhere?
Offline
likytau wrote:Here's a simple script I wrote to split a filelist into chunks and invoke sxiv -i on each chunk one by one.
Looks really useful, but that host seems down. Could you mirror that elsewhere?
I just checked and it is up for me currently (actually, I've never noticed any downtime at all with bpaste.net).
Anyway here is a pastebin mirror: http://pastebin.com/ZPi1Qygy
Offline
hobarrera wrote:likytau wrote:Here's a simple script I wrote to split a filelist into chunks and invoke sxiv -i on each chunk one by one.
Looks really useful, but that host seems down. Could you mirror that elsewhere?
I just checked and it is up for me currently (actually, I've never noticed any downtime at all with bpaste.net).
Anyway here is a pastebin mirror: http://pastebin.com/ZPi1Qygy
I just check this. They have broken DNS configuration that makes the host inaccesible for people with IPv6-only or dual-stacked (they have an IPv6 address configured for bpaste.net, but it points to a server which is not listening for HTTP, so it just fails with "Connection Refused").
I would suggest that you avoid bpaste.net, since there is a portion of the internet that cannot access their site due to misconfiguration.
More on-topic, thanks for sharing that! :-)
Offline
likytau wrote:hobarrera wrote:Looks really useful, but that host seems down. Could you mirror that elsewhere?
I just checked and it is up for me currently (actually, I've never noticed any downtime at all with bpaste.net).
Anyway here is a pastebin mirror: http://pastebin.com/ZPi1QygyI just check this. They have broken DNS configuration that makes the host inaccesible for people with IPv6-only or dual-stacked (they have an IPv6 address configured for bpaste.net, but it points to a server which is not listening for HTTP, so it just fails with "Connection Refused").
I would suggest that you avoid bpaste.net, since there is a portion of the internet that cannot access their site due to misconfiguration.More on-topic, thanks for sharing that! :-)
Hey, I'm the maintainer of bpaste and someone just notified me to this thread. It's getting quite late here but I'll take a look tomorrow. It's either a broken firewall or a misconfigured haproxy.
Offline
Yes, it was broken since we swapped SSL termination from pound to nginx, and all configuration that happened due to that.
It should now be possible to connect again to both 80 and 443 over v6. Sorry for the inconvenience. If anything is wrong contact me outside this thread so we don't derail it fully
Offline
Yes, it was broken since we swapped SSL termination from pound to nginx, and all configuration that happened due to that.
It should now be possible to connect again to both 80 and 443 over v6. Sorry for the inconvenience. If anything is wrong contact me outside this thread so we don't derail it fully
Thanks. I just quickly verified it when I posted the above message, and had no real fast way of finding who to contact.
Cheers.
Offline
Just posting this exechandler snippet here in case someone hasn't thought of it:
"C-V") sxiv "$@"&;;
With multiple-selection and the toggle-marks-on-all command, this makes it very easy to clone a sxiv session.
Simple enough that I was thinking about proposing it for addition to the stock exec-handler.
However, I don't know what is a reasonable keybinding (my keybindings are specifically not stuck behind a prefix key -- so the above, I literally type only Ctrl+Shift+V to run.)
Last edited by likytau (2014-10-02 12:35:26)
Offline
I've implemented filelist reordering (that is, reordering individual files within the filelist). Not sure whether this is something bert considers worth having in mainline sxiv, but it's very useful for my purposes.
https://bpaste.net/show/b1a0aa5023bb
(git patch -- you'll need a clone of sxiv git, then you can run 'git am $FILENAME' to apply it.)
Does not include keybinds, because I know the patch wouldn't apply if I did. The lines in my config.def.h are these:
{ Mod1Mask , XK_Left, g_reorder_image, (arg_t) -9999999 },
{ Mod1Mask , XK_Right, g_reorder_image, (arg_t) 9999999 },
(Mod1 means "Alt" here, BTW)
This is set up so that I can very quickly shove a given image to either the start or end of the list. You could use much smaller offsets, eg -1, 1 if you want to just swap the current image with the previous/next image.
It pays attention to any prefix code you enter, taking the sign from the binding argument, and the amount of movement from the prefix code (for example, typing 30 followed by Alt+Right would move the current image 30 images forward in the filelist. Typing 30 followed by Alt+Left would move the current image 30 images backward in the filelist. Pressing Alt+Left|Right with no prefix would just move the image to the start or end of filelist.)
Example of operation:
http://i.imgur.com/oKiWU9B.gif
EDIT: Updated with some minor bugfixes.
EDIT2: small usability improvement.
-- mod edit: read the Forum Etiquette and only post thumbnails http://wiki.archlinux.org/index.php/For … s_and_Code [jwr] --
EDIT3: Here's another simple patch I made to show how many files are currently marked if the current file is marked. Simple enough that you can easily apply it manually.
@@ -429,6 +429,8 @@ void update_info(void)
} else {
ow_info = true;
}
+ if (strlen(mark) > 0)
+ bar_put(r, "%d", markcnt);
bar_put(r, "%s%0*d/%d", mark, fw, fileidx + 1, filecnt);
} else {
bar_put(r, "%s", mark);
Last edited by likytau (2014-10-17 06:55:11)
Offline