diff options
author | hut <hut@lavabit.com> | 2010-03-08 01:09:49 +0100 |
---|---|---|
committer | hut <hut@lavabit.com> | 2010-03-08 01:10:23 +0100 |
commit | 3bd534c979e5b37fdd76895ed542ebf44f2ef494 (patch) | |
tree | 220aa986ea45d4a1d252ff1c2a6705caaf996e34 | |
parent | 9f9fcdd2d6e970777fced0bc5b982a4e7021078d (diff) | |
download | ranger-3bd534c979e5b37fdd76895ed542ebf44f2ef494.tar.gz |
apps: improved feh invocation
loading all images now, in the same order as in ranger
-rw-r--r-- | ranger/defaults/apps.py | 13 |
1 files changed, 12 insertions, 1 deletions
diff --git a/ranger/defaults/apps.py b/ranger/defaults/apps.py index cc77640c..a099ec2f 100644 --- a/ranger/defaults/apps.py +++ b/ranger/defaults/apps.py @@ -128,7 +128,18 @@ class CustomApplications(Applications): return tup('feh', arg[c.mode], c.file.path) if c.mode is 4: return tup('gimp', *c) - return tup('feh', *c) + if len(c.files) > 1: + return tup('feh', *c) + + from collections import deque + + directory = self.fm.env.get_directory(c.file.dirname) + images = [f.path for f in directory.files if f.image] + position = images.index(c.file.path) + deq = deque(images) + deq.rotate(-position) + + return tup('feh', *deq) @depends_on('aunpack') def app_aunpack(self, c): |