phillipberndt / pqiv Goto Github PK
View Code? Open in Web Editor NEWPowerful image viewer with minimal UI
Home Page: http://www.pberndt.com/Programme/Linux/pqiv/index.html
License: GNU General Public License v3.0
Powerful image viewer with minimal UI
Home Page: http://www.pberndt.com/Programme/Linux/pqiv/index.html
License: GNU General Public License v3.0
This feature has been requested by numerous users. It should be quite easy to add it via gio's file system monitoring, which internally uses inotify under Linux. I'll add it in the first release after 2.0.
Following on to issue #21, we decided not to reimplement the "bug" where directories passed in via stdin weren't recursive, but those on the commandline were.
Is it worth having a commandline option to disable directory recursion? It could be useful if you had a directory structure where you had foo, foo/bar, and foo/baz, but only wanted images in foo and foo/baz; you could list them, and specify the non-recursive option, and get the desired behavior.
However, this adds knobs and buttons to the app, and so I'm not sure whether it's worth it. It's nice to be able to replicate the behavior of the 1.x series, even if it was a bug.
Of course, with -r
working again, I suppose you could tell people to construct a pipeline, as well, a la find foo foo/baz -type f -maxdepth1 | pqiv -r
.
What are your opinions on this? I'd sign up to implement it if you think it'd be useful.
How to reproduce:
Valgrind / gcc's sanitize scripts do not help, the error is an unspecific *** Error in ./pqiv: corrupted double-linked list: 0x000000000071f340 ***
At least in xfwm4 the window always moves to the top-left. Maybe I should reposition the window after leaving fs?
Command line: pqiv a.jpg b.jpg c.jpg
Expected behavior:
Pqiv displays the three images in the same order as they appear in the command line.
Actual behavior:
They are displayed in the reverse order -- first c.jpg
, then b.jpg
, and finally a.jpg
.
I use git version of pqiv.
The --watch-directories option work very well but I've noticed that if you delete all but one image from a source folder, pqiv in slideshow mode, will show this last image plus one other. I'm guessing there is some internal cache of images that is not being fully cleared? Many thanks for looking into it.
cc -Wall -Wextra -Wfloat-equal -Wpointer-arith -Wcast-align -Wstrict-overflow=5 -Wwrite-strings -Waggregate-return -Wunreachable-code -Werror -Wno-unused-parameter -std=gnu99 -o pqiv `pkg-config --cflags gtk+-3.0 glib-2.0 cairo gio-2.0` pqiv.c lib/strnatcmp.o `pkg-config --libs gtk+-3.0 glib-2.0 cairo gio-2.0` -O3
pqiv.c: In function ‘do_jump_dialog’:
pqiv.c:1601:3: error: ‘GtkStock’ is deprecated [-Werror=deprecated-declarations]
GTK_STOCK_OK,
^
cc1: all warnings being treated as errors
make: *** [pqiv] Error 1
See title. This prevents cool stuff like pqiv --slideshow --end-of-files-action=quit --slideshow-interval=10 foo.png
(show foo.png for 10 seconds then quit).
Under the awesome tiling window manager, full-screen mode seems to have a problem. The result is the same when I toggle it either via the wm controls or via the 'F' key: the image window has either full height but less than full width or full width but less than full height. I'm attaching a screenshot. Awesome has a floating mode as well as a tiling mode, but the mode makes no difference.
It seems the problem manifests only if the first image to appear is smaller than the screen in either dimension. For example, my screen is 1280x1024 - if 1.png is smaller than this and 2.png is equal or bigger, running:
pqiv -f 1.png 2.png
results in a full-screen window that doesn't cover the screen (even when switching between the images), while running:
pqiv -f 1.png 2.png
results in a true full-screen window which stays full-screen.
Could this be a problem at pqiv's end, or should I ask at the awesome mailing lists?
See title, the info-box still flickers when scrolling fast through multiple images. I am using the newest release.
If no new bugs arise within this week, I'll release 2.2.
I've been trying having pqiv --watch-directories
run for a directory under /tmp while aria2c downloads images in the background. It works okay, but I have to ensure that an image exists before starting pqiv or it will exit. Sometimes I want to clear all the images in the directory and then re-populate it with other images. This also can cause pqiv to close. Would it be possible to have pqiv stay open even in an empty directory (by default or with another option)?
Another problem is that pqiv will sometimes read an image before it is fully downloaded, causing it to fail and never be loaded. I'm not sure if there is a good way to deal with this though. I guess pqiv could retry reading failed images a few times, but for such a limited use case, it probably doesn't make sense to add that functionality. I realize that I can just pass pqiv a bunch of urls, but this is slow, and I want to be able to update/add to the images later.
I'd like to add pqiv integration to ranger (the open_all_images option). This requires the image viewer to have an option to start at a image other than the first one (e.g. --start-at 2
would show the second image initially), so that the user's place in the file manager is maintained.
Currently, the image is rescaled at each draw. This especially makes fading unnecessary slow at some PCs for big images.
Zooming works fine on animated images, but when I try to zoom on a normal image, nothing happens until I take some wm action like switching desktops (after which it will redisplay with zoom). I'm using bspwm, but I haven't noticed anything like this happen for other programs. Any ideas about what might be causing this?
Determine correct minimal versions of the dependencies (and add gdk-pixbuf..)
As per the title:
Here's a link to the patch for the Makefile:
http://autogeree.net/~jca/tmp/pqiv-patch-Makefile
All credits go to jca at wxcvbn dot org .
See title. Suggested by Martin Herrmann.
Can --browse
be sorted by file creation time?
Everytime i use a command pqiv only displays the Help but dose not start. I have reinstalled it multiple times but allways get this error. If you tell me what informations you need to help me i would post them.
If the scale-images-up=1
is in .pqivrc, it causes a SEGV fault in pqiv on my raspberry pi. I believe this is likely to happen with any option that uses the underlying CALLBACK framework in the code.
The fix for me was simple (two changes on line 590 in the current pqiv.c code)
(*(GOptionArgFunc)(iter->arg_data))(iter->long_name, option_value, NULL, &error_pointer);
/* INSTEAD OF
** (*(GOptionArgFunc *)(iter->arg_data))(NULL, option_value, NULL, &error_pointer);
*/
Thanks for creating this utility. It's working well for what I needed it for.
KDE seems to have problems with GTK_WIN_POS_CENTER_ALWAYS
.
Whenever I left or right click to change images, it skips every other file, or at least it appears that way, I only have four files in the directory. If I hit the spacebar, it cycles through all the images as expected.
It currently scales the image down when you scale the window down, however when you scale the window up the image doesn't, instead it adds a black background/border: https://sr.ht/3BDQ.png
Do not wait until all images are loaded, display as soon as we've got something.
This requires some changes:
current_image
must be kept up-to-dateSee title.
If no new bugs arise until in about 2 weeks, I should release 2.1.
Currently, the program draws way more often than needed.
It would be cool to be able to override the window title.
qiv added --browse
some time ago:
--browse, -B Useful when launching from a file manager
When #24 is resolved, this option would make sense for pqiv, too.
Implementing this should be pretty straight-forward, except for the question how to prevent the image from being added twice (once from the command line, once from the directory traversal).
Sometimes it is needed to use mouse cursor in full-screen mode and it
Looks like there is no way in pqiv to show it. I solved this problem
By addingc' to show cursor and
C' to hide it again:Diff --git a/pqiv.c b/pqiv.c Index bc85565..589a2a3 100644 --- a/pqiv.c +++ b/pqiv.c @@ -3487,6 +3487,13 @@ gboolean window_key_press_callback(GtkWidget *widget, GdkEventKey *event, gpoint } break; + case GDK_KEY_c: + fullscreen_show_cursor(); + break; + case GDK_KEY_C: + fullscreen_hide_cursor(); + break; + case GDK_KEY_H: case GDK_KEY_h: {
But probably making a flag "needs to hide cursor in fullscreen",
Setting it from command line and being able to toggle it (like
Main_window_in_fullscreen) is more intuitive.
See branch poppler. The goal is PDF support, hence the branch'es name. There are major code structure changes, so any new functionality should be developed against that branch.
I was wondering if it would be possible to add a hotkey that allows you to toggle the shuffle mode on and off while you are viewing images.
The way I imagine it would work is as follows:
First of all, thank you for the nice image viewer. I've tried countless ones in the past, and this one is probably my favorite so far.
I think that having named actions instead of aliasing keys to other keys would be more readable. This would be especially nice for allowing for an arbitrary number of shell commands to be bound to any key (instead of using something like command-1=...
with keyboard-alias=a1
). It might also be nice to allow binding a key to change a specific option's value (e.g. set slideshow-interval to 0.5). To improve readability further, I think it would be nice to allow for multiple keyboard-alias
options to be specified. I've changed a lot of the key bindings in the config file, and the rebinds I've made are not at all obvious from looking at a bunch of characters. Also, I'm not sure how to rebind keys like control- or space (or if it's possible).
Another feature that would be great is support sequence key bindings. As a simple example, zi
could be bound to zoom in, and zo
could be bound to zoom in. If this ends up being implemented, I think it would be preferable to wait for the end of a chain or for an unbound key press instead of timing out. For example, if z
, zi
, and zo
were bound, pressing z
would wait for the next key press (as opposed to eventually timing out to the action bound to z
). If i
or o
was pressed after the z
, the bound actions would happen. If a key unbound at that level was pressed, it would reset to the "top level" key bindings.
Some of these requests would require changing the keybinding syntax. If you like any of the ideas, I'd recommend something similar to the following:
bind-key=<key> <action>
# single key
bind-key=a slideshow-toggle
# key sequence
bind-key=zi zoom-in
# control + f
bind-key=c-f fullscreen-toggle
# special characters
bind-key=<space> next-image
# g followed by space followed by control + f
bind-key=g<space>c-f shell-command ...
Finally, I think it would be nice to be able to unbind a key (bind to no action)
pqiv is a great command line tool! When I want use it as my default Image viewer, I encounter a problem:
when I use --browse, pqiv default load all images under the image's directory, including images in subdirectories, and
when --max-depth=1, pqiv will go into 1 levels of directories below current directory. That's reasonable, but
when --max-depth=0, pqiv will load only the one image I open.
So, how could I load the images in the current directory of the image I open(not include images in subdirectories), just like a normal Image Viewer.
This is not a threading related issue, but a logical error: current_image is updated before the new image is actually loaded. But keyboard and mouse input block if the current_image is not loaded.
Maybe waiting with updating current_image until the image is actually loaded will resolve this. But then I'd have to implement some mechanism to prevent the new image from popping up if the user has decided to move to another image in the meantime.
A dark window border would compliment images. This only requires to set the X11 property _GTK_THEME_VARIANT
to "dark".
cf. https://mail.gnome.org/archives/gnome-shell-list/2012-July/msg00099.html
The manpage could use some revamping.
See title. Suggested by Martin Herrmann and others. Old versions of pqiv had this already. This time I will write the code such that fading is also possible between images of different size.
Certain applications are not focussed correctly when they are in maximized mode in a tag.
I noticed this problem with firefox, thunar and wireshark. It happens both in "fair" layout and in floating layout.
Steps to reproduce:
Start one of the above mentioned applications in a clean tag.
Maximize the window.
switch tags and switch back again
open some other windows
close the other windows.
try to close the maximized window.
Expected result:
all applications that are opened can be closed correctly, including the maximized one.
Actual result:
The other applications are closed, but the maximized one can not be closed.
It can also not be minimized or made fullscreen or any other action that requires a focussed window.
Let me know if you can confirm this issue.
I'm now using version 3.5.6 which does not have this problem.
Pretty much no linux image viewer supports it and I do not feel comfortable with a media player. May this happen eventually?
I've just noticed that a slideshow with 2 photos, will rotate a few times and then get stuck - not moving on to the next photo.
I've not seen this before and wonder it its due to some recent changes?
Command is:
pqiv -s -f -F -d 10.0 --fade-duration=0.8 --watch-directories --shuffle <folder containing 2 images>
I'm using 1a1b528
Many thanks for looking.
I would like to show a logo every 10 images. I know I can put in the logo image file after 10 images again and again, but this wouldn't work with shuffle option.
I use pqiv extensively and appreciate it, but I found the 2.x release (and unfortunately, the 1.x release won't compiler for me) removed the -r ("Read additional filenames (not folders) from stdin") option.
I cannot find the devlopment history between pqiv 1.0 (on the gtk2 branch) and the initial commit of the 2.x RC code, so it's hard to tell why this option was removed?
I think it'd be easy to add back (and, in fact, I'm happy to submit a pull-request that does exactly that), but I don't want to waste my time if there was an actual reason it was removed.
Hi Phillip, thanks a lot for doing this great application! I've just tested the rewrite branch (which has been labelled "semi-stable"), and it appears I have encountered the following two issues:
"--hide-info-box" is documented, but doesn't work. Variable option_hide_info_box is never used.
I have several image files slightly smaller than my screen size (between 80% and 100%). I used to use "-t" twice to prevent them from being scaled. With the rewritten version, it appears neither "-t -t" nor "--disable-scaling" works as expected.
Would it be possible to add a new option, say, --once that would mean pqiv starts in slideshow mode, displays all pictures available just once and then exits? In other words, it does not wrap around.
Probably this new option would be ignored if --shuffle was supplied?
Many thanks for consideration.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.