Skip to content
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

Interactive Zooming #13

Open
korakinos opened this issue Jun 23, 2015 · 0 comments
Open

Interactive Zooming #13

korakinos opened this issue Jun 23, 2015 · 0 comments

Comments

@korakinos
Copy link

This image viewer is amazing: Extremely fast and very nice to use from the command line!

However, it doesn't seem to let one control the image zoom, except by resizing the containing window, as it seems to always scale the image to fit the window. For very large images (lmuch arger than the screen resolution), this is very inconvenient. For images of other sizes, it would still be nice to have.

Following the spirit of meh, the way to go is probably to keep this functionality out of meh itself and doing something like

meh * | xargs -I___ mogrify -scale -10% ___ 
# Note that this code doesn't work, it's just to show the idea: Hitting 
# enter should scale down the image.
# Note also that this, provided it worked like intended, would 
# permanently scale the actual image file, instead of just zooming 
# the display. This shouldn't be hard to work around, though.

However, this way we only get one-way zoom, and as there is just one STDOUT, I don't see an obvious way to trigger two (or more) different commands for zooming in and out. Maybe if meh hat an option to write to one of several (named) pipes, depending on keystroke? Not sure about that, but then I don't know much about pipes.

Another idea: Hitting a number key could output the image filename (like with enter) plus the respective number (after a whitespace). Then the command behind the pipe could decide on what to do depending on which number it received along with the filename.

Or maybe Ctrl plus any symbol key could act like that? Then this wouldn't be restricted to just the number keys (but to always holding the Ctrl key...).

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

No branches or pull requests

1 participant