with <rr69c6$vk7$
1...@gioia.aioe.org> gamo wrote:
> El 13/12/20 a las 19:55, Grant Taylor escribió:
>> On 12/13/20 7:56 AM, gamo wrote:
>>> I want to know the aproximate proportios of a text cursor in a
>>> xterm. Have I to explain more?
>> It will probably be font and size dependent.
>> Take a screen shot and measure the cursor in a graphics program.
> Actually I try the magic number 2 to equalize lines size with cols
> size. Seems only 'adequate'. Thanks for your suggestion, but I'm
> using standard Ubuntu.
And here comes your XY-problem. I've found this inside xterm(1):
GetWinSizeChars (18)
Report the size of the text area in characters as
numbers.
GetWinSizePixels (14)
Report xterm window in pixels as numbers.
When (if ever) you get these pairs then you can divide items from second
pair by items of first pair thus achieving area of a character what,
effectevily, is area of the cursor. Now, these are mentioned in
*WindowOps. However, my reading is these two are *control sequences*,
and they (control sequences) can be 'abused in a script'.
Now, I have no idea what these sequences are, where to get them from,
how to get anything back from a terminal, because Term::ReadKey is my
limited experience dealing with terminals (it does everything I ever
needed from terminal). You are on your own now.
OTOH, it's not clear what exactly you are trying to achieve, but it
feels like starting xterm with approriate geometry and/or font is what
you need instead.
--
Torvalds' goal for Linux is very simple: World Domination
Stallman's goal for GNU is even simpler: Freedom