You are not logged in.

#26 2015-12-13 19:51:32

karlch
Member
Registered: 2015-06-14
Posts: 105

Re: Vimiv - an image viewer with vim-like keybindings

The exceptions mainly handle errors in the config and missing dependencies (which shouldn't happen if one uses the AUR package).

It looks like argparse does not support options that start with anything different than '-', would using capital letters be an acceptable alternative?

Offline

#27 2015-12-13 20:12:19

respiranto
Member
Registered: 2015-05-15
Posts: 479
Website

Re: Vimiv - an image viewer with vim-like keybindings

karlch wrote:

It looks like argparse does not support options that start with anything different than '-', would using capital letters be an acceptable alternative?

Yes, of course, it was just a suggestion based on what I am used to for such things.
I see that it does not make much sense to write one's own argparser, just to support +-options.

Offline

#28 2015-12-13 23:20:00

respiranto
Member
Registered: 2015-05-15
Posts: 479
Website

Re: Vimiv - an image viewer with vim-like keybindings

Another suggestion:

s/\(self.win.set_title("vimiv\) "+message)/\1")/

to prevent e.g. typed numbers from being displayed in the titlebar.

Offline

#29 2015-12-14 08:08:55

karlch
Member
Registered: 2015-06-14
Posts: 105

Re: Vimiv - an image viewer with vim-like keybindings

The statusbar has also received some big changes in 0.3 and the window title went hand in hand with that. The new window title will be:

  • "vimiv" if no images are open,

  • "vimiv - ${imagename}" if images are open.

Should go hand in hand with your suggestion.

Offline

#30 2015-12-14 11:07:03

respiranto
Member
Registered: 2015-05-15
Posts: 479
Website

Re: Vimiv - an image viewer with vim-like keybindings

Yes, sounds good.

List 5:

  1. To continue with the statusbar, I have another suggestion:
    Currently, an error message is displayed for a fixed time (5s), however not removed once a new non-error status message appears.
    Could this behaviour be changed?

  2. sg: Recalculate vector image on zooming (in)
    - probably optional since this can take some time for big files.

  3. vimiv.1:
    s/.IR GEOMETRY\]/.IR GEOMETRY ]/
    s/.IR SLIDESHOW-DELAY\]/.IR SLIDESHOW-DELAY ]/

Last edited by respiranto (2015-12-14 13:28:32)

Offline

#31 2015-12-14 19:35:07

karlch
Member
Registered: 2015-06-14
Posts: 105

Re: Vimiv - an image viewer with vim-like keybindings

Alright, 0.3 is online! Now with two screenshots on the github page.

Main differences:

  • Vimiv is now single window

  • Much better statusbar

  • Catch some more exceptions

  • Manipulation of very large images (>3MB or so) is now more responsive

Still on my TODO list:

  • Actual pause and play of gifs

  • Recalculate vector graphics

The problem is, I still have now idea how to do any of this...

Offline

#32 2015-12-14 20:18:04

respiranto
Member
Registered: 2015-05-15
Posts: 479
Website

Re: Vimiv - an image viewer with vim-like keybindings

Well done!

However, like always, some more points (List 6):

  1. sg: make non-ambiguous keys concerning the image work when the library is opened

  2. So you don't plan to implement 4.1 (-B and -F)?

  3. sg: draw a line between the browser and the image

  4. sg: make it configurable whether the library fullfills the whole window when no image is selected

  5. sg: when going up a directory, mark the just left directory as current

  6. sg: add the option to keep the library after choosing an image


Your TODO list:

  1. Might this help you?
    https://gist.github.com/revolunet/848913

  2. You would probably have to check whether the image is a vector graphic by suffix and then redraw it upon each zoom command, just like when a new image is printed.

Unfortunately, I currently don't have the time to try this on my own.

Offline

#33 2015-12-14 20:38:25

karlch
Member
Registered: 2015-06-14
Posts: 105

Re: Vimiv - an image viewer with vim-like keybindings

List 6:

  1. Something like "n", or "p"? Why would this be useful?

  2. Should be done, works for me, is in my manpage

  3. Sorry but nope, I don't like lines and I would have to colour it depending on the Gtk Theme of the user. Maybe sometime as a choosable option, but no priority.

  4. Why would one want to waste space?

  5. So if one leaves e.g. "Images" up to "home" you want "Images" to be marked?

  6. Just focus the image once using "l" and then change focus to the image using "O". I don't know if an extra keybinding would be useful.

TODO List:

  1. Looks interesting, just completely different than I currently handle Gifs. Will look into that, thank you!

  2. I will play around a bit big_smile

Offline

#34 2015-12-14 21:05:59

respiranto
Member
Registered: 2015-05-15
Posts: 479
Website

Re: Vimiv - an image viewer with vim-like keybindings

List 6:

  1. To not always have to switch, using O, which I just learned to use (I should really read the manpage more thoroughly)

  2. I see, I was simply confused by the fact that error messages are still shown, which obviously makes sense.

  3. OK

  4. One might want it to look more consistent.
    There could also be an option to display the library always in full size.

  5. Yes.

  6. see 1


Point 6.7:

  • sg: when opening /path/to/file, change directory in library to /path/to/ .

Last edited by respiranto (2015-12-14 21:07:33)

Offline

#35 2015-12-15 16:17:01

karlch
Member
Registered: 2015-06-14
Posts: 105

Re: Vimiv - an image viewer with vim-like keybindings

6.1 You seem to use the library a lot more than I do. Sure, done, all this was is copy-paste...
6.4 Hmm, I guess additional user settings don't do any harm. Can be done, but as 6.3 no priority.
6.5 The directory one leaves upwards is now always focused, that should be enough visual indication. Or what did you mean?
6.7 I remember having this behavior before, changed back.

Offline

#36 2015-12-23 12:09:56

respiranto
Member
Registered: 2015-05-15
Posts: 479
Website

Re: Vimiv - an image viewer with vim-like keybindings

It seems like 2.4, `vimiv <folder>' does not work (anymore?):

< rmac:~ > vimiv Pictures/
Traceback (most recent call last):
  File "/usr/bin/vimiv", line 1598, in move_up
    self.reload(os.path.abspath("."), curdir)
  File "/usr/bin/vimiv", line 1607, in reload
    self.scrollable_treelist.remove(self.treeview)
AttributeError: 'Vimiv' object has no attribute 'scrollable_treelist'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/usr/bin/vimiv", line 1882, in <module>
    Vimiv().main()
  File "/usr/bin/vimiv", line 1783, in main
    self.parse_args()
  File "/usr/bin/vimiv", line 1774, in parse_args
    self.populate(args.path, True)
  File "/usr/bin/vimiv", line 1273, in populate
    self.move_up(arg)
  File "/usr/bin/vimiv", line 1600, in move_up
    self.err_message("Error: directory not accessible")
  File "/usr/bin/vimiv", line 469, in err_message
    self.toggle_statusbar()
  File "/usr/bin/vimiv", line 495, in toggle_statusbar
    self.labelbox.show()
AttributeError: 'Vimiv' object has no attribute 'labelbox'

Another point:
Would it be possible to make symlinks work?

Offline

#37 2015-12-23 14:01:08

karlch
Member
Registered: 2015-06-14
Posts: 105

Re: Vimiv - an image viewer with vim-like keybindings

You are right, looks like I destroyed that by changing the startup folder of the library, works again I hope smile

To be honest, I don't know. I will read into chasing symlinks in python.

EDIT: should work now

Last edited by karlch (2015-12-23 14:55:27)

Offline

#38 2015-12-30 09:45:35

jmartl109
Member
Registered: 2011-03-17
Posts: 25

Re: Vimiv - an image viewer with vim-like keybindings

I like this! I have a feature request: can you support the exif orientation attribute? My digital camera encodes orientation using this attribute, so if it's ignored, all the portrait-orientation photos appear rotated. I know I can manually rotate all of these, but it's easier if done automatically. Thanks!

Offline

#39 2015-12-30 16:37:43

karlch
Member
Registered: 2015-06-14
Posts: 105

Re: Vimiv - an image viewer with vim-like keybindings

Thanks for your feedback, glad you like it!

I added the function rotate_auto which rotates all images in the current filelist according to EXIF data. It tries to use ImageMagick and falls back to PIL if it isn't installed. By default it is bound to "a".

Hope this helps! smile

Offline

#40 2015-12-31 05:13:38

Rasi
Member
From: Germany
Registered: 2007-08-14
Posts: 1,914
Website

Re: Vimiv - an image viewer with vim-like keybindings

NIce little tool, I left some issues on the bugtracker, if you don't mind smile


He hoped and prayed that there wasn't an afterlife. Then he realized there was a contradiction involved here and merely hoped that there wasn't an afterlife.

Douglas Adams

Offline

#41 2016-01-01 08:12:32

jmartl109
Member
Registered: 2011-03-17
Posts: 25

Re: Vimiv - an image viewer with vim-like keybindings

karlch wrote:

Thanks for your feedback, glad you like it!

I added the function rotate_auto which rotates all images in the current filelist according to EXIF data. It tries to use ImageMagick and falls back to PIL if it isn't installed. By default it is bound to "a".

Hope this helps! smile

Thank you!

For some reason, though, it's using PIL (as indicated in the status line) even though I have imagemagick installed. Is there another package I should install for that? The PIL method seems to be nearly doubling the image size (and erasing a lot of the metadata) in order to rotate the image. Maybe the imagemagick method does this better?

Offline

#42 2016-01-01 15:53:49

esonn
Member
From: Austria
Registered: 2015-10-01
Posts: 61

Re: Vimiv - an image viewer with vim-like keybindings

karlch, great work - I really enjoy it, that's the image viewer I've been searching for years, seriously.

Is there any way to *automatically* scale/stretch the image in fullscreen mode, so that the image is always fully visible and scaled to fill the screen (either horizontally or vertically, should be auto-determined)? This is especially annoying with mid-res images on hi-res displays.

E/e shortcuts work fine, but 1) it would be nice to scale automatically, without me having to decide on the axis, and 2) to do so persistently, i.e. for all images (in the current run, or folder, or slideshow, or whatever - config option would be nice).

Am I missing something in the docs, or is this simply not meant to be implemented that way?

Last edited by esonn (2016-01-01 16:01:06)


Anyone who quotes me in their sig is an idiot. -- Rusty Russell

Offline

#43 2016-01-03 14:22:02

karlch
Member
Registered: 2015-06-14
Posts: 105

Re: Vimiv - an image viewer with vim-like keybindings

Sorry guys for the rather late reply, I was on holiday for a few days.

Rasi wrote:

NIce little tool, I left some issues on the bugtracker, if you don't mind smile

Of course I don't mind, I will reply there.

jmartl109 wrote:

For some reason, though, it's using PIL

What is the output of

jhead -autorot -ft /path/to/images
esonn wrote:

Is there any way to *automatically* scale/stretch the image in fullscreen mode

First of all thanks for your compliments.
If you haven't zoomed with + or - yourself it should be the default behaviour.
Additionally to the e/E shortcuts there is the w shortcut which zooms to fit unless you prefix it with a number.
What vimiv does not do is "overzoom" small images automatically as they possibly look horrible. I could add a keybinding or a config option therefore though if that is what you mean. I will also take a look at your fork smile

Offline

#44 2016-01-04 06:40:40

jmartl109
Member
Registered: 2011-03-17
Posts: 25

Re: Vimiv - an image viewer with vim-like keybindings

karlch wrote:
jmartl109 wrote:

For some reason, though, it's using PIL

What is the output of

jhead -autorot -ft /path/to/images

It wasn't installed. I installed it, and now this is much better! Maybe jhead should be an optdepends, in addition to imagemagick.

Offline

#45 2016-01-04 11:15:53

karlch
Member
Registered: 2015-06-14
Posts: 105

Re: Vimiv - an image viewer with vim-like keybindings

jmartl109 wrote:

It wasn't installed. I installed it, and now this is much better! Maybe jhead should be an optdepends, in addition to imagemagick.

Thanks for this, I thought it was part of imagemagick for some reason... I added it to the optdepends smile

Offline

#46 2016-01-14 15:59:30

karlch
Member
Registered: 2015-06-14
Posts: 105

Re: Vimiv - an image viewer with vim-like keybindings

Back again with version 0.4 smile

The main change is that vimiv now has an actual command line at the bottom of the screen. Tab-completion works, also for paths.
The update was rather large and I had a few doubts concerning how to implement this, so if you have bugs, suggestions, ... I would love to hear them!

As always, further information on github and in the man-page.

Offline

#47 2016-01-14 20:07:44

respiranto
Member
Registered: 2015-05-15
Posts: 479
Website

Re: Vimiv - an image viewer with vim-like keybindings

Great to hear!

I have not tested many of the new features yet, mostly due to the fact that I am in most cases satisfied by `vimiv file|dir' and then possibly iterating over the images in the given directory.
Though, especially the command-line function sounds nice.
Some notes on that:

  1. I tried '!echo test > ~/test.txt' which does not seem to have any effect.

  2. sg: A command history would be great

  3. sg: I personally would prefer the entered colon to be visible, but probably it is not possible to give the input box a layout that looks good with that.

One small issue that I have noted, and that is probably not new, is, that when I open an image via a symbolic link, vimiv's working directory is set to the directory the original, regular file resists in, which is not desirable, especially when a directory contains more than image respectively symbolic link to such one.

Offline

#48 2016-01-14 20:26:15

karlch
Member
Registered: 2015-06-14
Posts: 105

Re: Vimiv - an image viewer with vim-like keybindings

Nice to hear from you again!

  1. This is almost certainly because of the output redirection. This doesn't work out of the box and I don't really see any point in implementing it.

  2. I implemented it. The history file is ~/.vimiv/history. The keybinding therefore is ^k or ^j, possibly I should use arrow keys per default and only change that in my own vimivrc...

  3. I have thought about this. It will be implemented when I find out how to close the command line as soon as the colon is deleted.

Makes sense, I will see how I can change this. I don't really use it for any symbolic links so I tend to not notice stuff like this big_smile

Offline

#49 2016-01-14 20:46:43

respiranto
Member
Registered: 2015-05-15
Posts: 479
Website

Re: Vimiv - an image viewer with vim-like keybindings

  1. So you do more than just something like system(), after replacing % and similar?

  2. Again, I should have read respectively searched the manpage first...
    Though I would still like to see the arrow keys achieving this task.

  3. That's possibly the point where the fancy library you probably use for reading the input string, fails.
    Unless it either allows you to do specifically what you want, i.e. to terminate as soon as the input is empty or it allows you to perform custom operations after each keypress to achieve the effect manually.

  4. another point, related to 1.: I don't know, whether it is already implemented, but it should necessarily be possible to escape special characters such as %.

Offline

#50 2016-01-14 21:28:49

karlch
Member
Registered: 2015-06-14
Posts: 105

Re: Vimiv - an image viewer with vim-like keybindings

  1. I did use Popen from subprocess catching stdout and stderr. I now do not catch stdout as I don't really use it anyway and just pass it to the shell. This means it works now. Although I don't see any sense, it is a cleaner solution. Thanks!

  2. You can always bind the arrow keys in your config for the moment...

  3. Looks like connecting to the text changed event is a good solution.

  4. Not implemented yet, makes sense, shouldn't be difficult.

EDIT: failed to mention that I have not pushed to master yet, it works for me but I still want to do a bit more before pushing

EDIT2: should all be done

Last edited by karlch (2016-01-14 23:53:13)

Offline

Board footer

Powered by FluxBB