bug-bash
[Top][All Lists]
Advanced

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

Re: recalculate LINES and COLUMNS


From: Mike Stroyan
Subject: Re: recalculate LINES and COLUMNS
Date: Tue, 21 Aug 2007 16:42:38 -0600
User-agent: Mutt/1.5.13 (2006-08-11)

On Mon, Aug 20, 2007 at 07:40:47AM +0200, 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 works fine for me using rxvt-unicode 8.1 and bash 3.2.13(1) from
ubuntu 7.04.  If a urxvt window is maximized or grows large enough to exceed
the screen size, then the number of columns changes and $COLUMNS is
updated immediately without using any kill command.  (If the window is
not maximized and remains small enough fit the screen then the number of
lines and columns is not changed by the font change escape sequence.)

-- 
Mike Stroyan <mike@stroyan.net>




reply via email to

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