bug-bash
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: recalculate LINES and COLUMNS


From: Chet Ramey
Subject: Re: recalculate LINES and COLUMNS
Date: Tue, 21 Aug 2007 22:06:55 -0400
User-agent: Thunderbird 2.0.0.6 (Macintosh/20070728)

thomas wrote:

> Sometimes I want to change the font of my terminal (urxvt): for
> instance, I am tired and want a bigger font. I can use a bash alias
> (or a keyboard shortcut) which runs these two lines:
> 
> printf '\e]710;%s\007' 'xft:DejaVu Sans Mono:size=10'
> kill -WINCH $$
> 
> Font is changed but the second line seems to have no effect: bash does
> not recompute the values of COLUMNS and LINES, thus I may type
> "outside urxvt's window".
> 
> There is a "checkwinsize" option but it does not seem to help.
> 
> If I manually resize the window, the problem is fixed.
> 
> How can I send a WINCH signal to bash so that it recalculates the
> correct values of LINES and COLUMNS after a font change?

It appears that the escape sequence to change the terminal's font size
does not change the kernel's idea of the window size, whereas resizing
causes the terminal emulator to send the new dimensions to the kernel.

Chet
-- 
``The lyf so short, the craft so long to lerne.'' - Chaucer
                       Live Strong.  No day but today.
Chet Ramey, ITS, CWRU    chet@case.edu    http://cnswww.cns.cwru.edu/~chet/




reply via email to

[Prev in Thread] Current Thread [Next in Thread]