forked from erikrose/blessings
-
Notifications
You must be signed in to change notification settings - Fork 79
Improved Sixel height and width, on_resize.py improved #320
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
Merged
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Implement sixel size preference by suggested implementation from, pexpect/ptyprocess#79 (comment)
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## master #320 +/- ##
=======================================
Coverage 98.33% 98.33%
=======================================
Files 11 11
Lines 2458 2468 +10
Branches 424 429 +5
=======================================
+ Hits 2417 2427 +10
Misses 31 31
Partials 10 10 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
we already had this method name published, we can't rename it
not sure how it got cut out ?!
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Improve sixel size order-preference by suggested implementation from @j4james,
pexpect/ptyprocess#79 (comment)
Pixel/Window and Sixel sizes are different because there is almost always some "remainder" in the margins of a window:

Sixel cannot draw in the black margin areas (smaller).
on-resize.py
The example script and surrounding documentation was improved to make this distinction clear, and, design tips on how "safely" use signal handlers as well as "de-bouncing" in our example.
Some example outputs of bin/on_resize.py:
height=29, width=143, pixel_height=764, pixel_width=1574, sixel_height=754, sixel_width=1573height=23, width=115, pixel_height=0, pixel_width=0, sixel_height=529, sixel_width=1150height=44, width=160, pixel_height=880, pixel_width=1440, sixel_height=0, sixel_width=0(no sixel)height=24, width=119, pixel_height=528, pixel_width=1190, sixel_height=0, sixel_width=0(no sixel)