Skip to content
This repository has been archived by the owner on Mar 10, 2021. It is now read-only.

Expose ws_xpixel and ws_ypixel #33

Open
swsnr opened this issue Oct 16, 2020 · 1 comment
Open

Expose ws_xpixel and ws_ypixel #33

swsnr opened this issue Oct 16, 2020 · 1 comment

Comments

@swsnr
Copy link

swsnr commented Oct 16, 2020

winsize also exposes the window size of the terminal in pixels which supports image drawing (e.g. in Kitty).

Would you mind to expose it as well?

By the way, while looking at the sources of term_size I noticed that it defines TIOCGWINSZ on its own, even though the libc crate also defines it. I guess that's because the constant wasn't part of libc when term_size was initially written? Perhaps using the libc constant would fix #32 🤔

@CreepySkeleton
Copy link
Contributor

I guess that's because the constant wasn't part of libc when term_size was initially written?

Either that or the authors wanted to avoid depending on libc just because of one constant. Either way, I would rather deprecate this crate in favor of termsize, see #31

Perhaps using the libc constant would fix #32

Correct.


Expose ws_xpixel and ws_ypixe

Keep in mind that it needs to be accomplished in a cross-platform way, e.g the API it must work on both Windows and Linux. Can it be accomplished on Windows at all? If not, I think this API belongs to nix.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants