-
-
Notifications
You must be signed in to change notification settings - Fork 57
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
Feature: option to fit vertically instead of horizontally #30
Comments
I remember I didn't add it because there wasn't a consistent way of getting the height of the terminal, only the width. |
Do you need the height in lines or pixels? For lines, maybe some inspiration could be taken from Python. There is a function in the standard library that checks for the COLUMNS and LINES environment variables (ref http://pubs.opengroup.org/onlinepubs/7908799/xbd/envvar.html#tag_002_003 ), or calls an ioctl: python/cpython@bcf2b59#diff-a6f29e907cbb5fffd44d453bcd7b77d5R128 I supposes that calling |
I see that the code does use an ioctl to get the columns! Could also return the lines. I haven’t done much C but this could be a fun thing to write. I’m not available in the next weeks, so someone else feel free to take this! |
Writing terminal_lines is easy but the command-line interface is harder, especially in the interaction of -w and the new flag. Could you define behaviour that you would accept?
(Value 0 to mean “do your best” inspired by make -j 0 meaning “use all processors”) |
I want to keep the default behaviour to fit horizontally because it makes up for more pixels and we can always scroll. 0 to make it fit vertically sounds nice to me 👍 |
Hello and thanks for this very nice program!
It seems like big images are resized to fit the width of the console, but I would prefer to see the whole image without scrolling. Could you add a way to control this?
Alternatively, an option (or changing the default behaviour) to fit horizontally or vertically depending on the picture (i.e. use the most screen without overflowing) would also work for me.
The text was updated successfully, but these errors were encountered: