8000 First image in directory not shown · Issue #694 · karlch/vimiv-qt · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

First image in directory not shown #694

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
mcp292 opened this issue Aug 17, 2023 · 10 comments · May be fixed by #792
Open

First image in directory not shown #694

mcp292 opened this issue Aug 17, 2023 · 10 comments · May be fixed by #792

Comments

@mcp292
Copy link
mcp292 commented Aug 17, 2023

I see this request was implemented with the --open-selected option: karlch/vimiv#81.

I am filing a bug because in the library, when I enter a directory with ENT, the first image is not shown. I have to n p back to it for the image shown to change; even though the first image is selected.

@mcp292
Copy link
Author
mcp292 commented Aug 17, 2023

Also, binding next and prev to <down> and <up> respectively under [IMAGE], does not update images, but n and p do.

@karlch
Copy link
Owner
karlch commented Aug 17, 2023

Thanks for the feedback! 😊

You mean, when you enter a new directory, then, the image list does not update automatically? If yes, then this is essentially #132, right? This is still open, as I am sure having this optionally is useful, but the implementation is quite tricky as opening all images in a directory, all the time, is quite the performance hit.
As a little convenience, note that you should be able to only view the image with l, instead of n and p. This is how I personally go about this, use l to enter a directory, and in case it is an image I may want to view, just hit it immediately again.

Concerning the second part, weird, this works just fine for me:

[IMAGE]
<down>: next
<up>: prev

mind sharing your keys.conf? This is for 0.9.0 or the git?

@mcp292
Copy link
Author
mcp292 commented Aug 17, 2023

Yes your are right. It is #132. The l trick is cool. If going all the way left closes the library menu, then shouldn't h bring it back?

I will get back to you on the .conf.

@mcp292
Copy link
Author
mcp292 commented Aug 17, 2023

Using version 0.9.0.

[GLOBAL]
<colon> : command
o : command --text='open '
yy : copy-name
ya : copy-name --abspath
yA : copy-name --abspath --primary
yY : copy-name --primary
r : delete --ask %%
R : delete %%
gi : enter image
gl : enter library
gm : enter manipulate
gt : enter thumbnail
f : fullscreen
G : goto -1
gg : goto 1
m : mark %%
x : quit
. : repeat-command
j : scroll down
h : scroll left
<left> : scroll left
l : scroll right
<right> : scroll right
k : scroll up
/ : search
? : search --reverse
N : search-next
P : search-prev
b : set statusbar.show!
tl : toggle library
tm : toggle manipulate
tt : toggle thumbnail

[IMAGE]
M : center
| : flip
_ : flip --vertical
<end> : goto -1
<home> : goto 1
<page-down> : next
n : next
<down> : next
<ctrl>n : next --keep-zoom
<space> : play-or-pause
<page-up> : prev
p : prev
<up> : prev
<ctrl>p : prev --keep-zoom
> : rotate
< : rotate --counter-clockwise
W : scale --level=1
<equal> : scale --level=fit
w : scale --level=fit
E : scale --level=fit-height
e : scale --level=fit-width
J : scroll-edge down
H : scroll-edge left
L : scroll-edge right
K : scroll-edge up
sl : set slideshow.delay +0.5
sh : set slideshow.delay -0.5
ss : slideshow
+ : zoom in
- : zoom out

[LIBRARY]
go : goto 1 --open-selected
n : scroll down --open-selected
p : scroll up --open-selected
L : set library.width +0.05
H : set library.width -0.05

[THUMBNAIL]
+ : zoom in
- : zoom out

[COMMAND]
<tab> : complete
<shift><tab> : complete --inverse
<ctrl>p : history next
<ctrl>n : history prev
<up> : history-substr-search next
<down> : history-substr-search prev
<escape> : leave-commandline

[MANIPULATE]
<colon> : command
f : fullscreen
b : set statusbar.show!

The arrow keys will change the selection, but the image list only gets updated with n or p.

@mcp292
Copy link
Author
mcp292 commented Aug 17, 2023

Oh wow, I'm just seeing the library bindings. That should be what i need:

<down> : scroll down --open-selected

@karlch
Copy link
Owner
karlch commented Aug 17, 2023

Ah, in this case I misunderstood you, the issue was <up> / <down> not updating the image, when in library mode? Yes, in this case binding those as described under [LIBRARY] should do the trick 😊

I can see why binding h in the way you described could be intuitive, but personally think having hjkl scroll the image is probably more important to stick with the vim-like flow ...

@mcp292
Copy link
Author
mcp292 commented Aug 17, 2023

Okay, adding the following to my [LIBRARY] works.

[LIBRARY]
...
<down> : scroll down --open-selected
<up> : scroll up --open-selected
<left> : scroll left --open-selected
<right> : scroll right --open-selected

Would adding --open-selected support for the last two bindings be a good workaround to #132? Instead of making it the default, the user can manually incur the expense.

I can see why binding h in the way you described could be intuitive, but personally think having hjkl scroll the image is probably more important to stick with the vim-like flow ...

This is a good point. From the library, two lefts brings you to the picture, but once on the picture, hjkl should move around that picture. Needing to do two lefts is a happy medium for me. It prevents me accidentally going into it and leaving the library and allows for the ll you mentioned to update the image.

@karlch
Copy link
Owner
karlch commented Aug 17, 2023

That is an interesting point, instead of having a setting (or maybe at some point in addition to the setting), one could have a flag that forces loading. Would probably call it something along --load-directory or so, but this could definitely be a nice mid-ground! I'll copy over this point to #132.

EDIT: this is of course all in the :scroll command, having a different name is stupid then, shame on me 😆

karlch added a commit that referenced this issue Aug 17, 2023
In the library, this option will autoload the images in the newly opened
directory.

Related to #694 and #132.
@karlch
Copy link
Owner
karlch commented Aug 17, 2023

In case you are feeling feisty, you could give the extend-open-selected branch a quick go. In my keys.conf I added the bindings:

[IMAGE]
<ctrl>h: enter library

[LIBRARY]
<ctrl>h: scroll left --open-selected
<ctrl>l: scroll right --open-selected
<ctrl>j: scroll down --open-selected
<ctrl>k: scroll up --open-selected

to have a consistend "opening and jumping back" when holding <ctrl>. Seems to work quite well 😊

Only issue I have, is that :scroll left --open-selected will jump to the image in the library once opened. Not sure if this is a bug or a feature 😆

@mcp292
Copy link
Author
mcp292 commented Aug 18, 2023

Glad you think so! I look forward to trying it out!

Only issue I have, is that :scroll left --open-selected will jump to the image in the library once opened. Not sure if this is a bug or a feature 😆

I have to play to be sure, but to me that sounds like what I'm after!

karlch added a commit that referenced this issue Mar 19, 2024
In the library, this option will autoload the images in the newly opened
directory.

Related to #694 and #132.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants
0