I'm using Arch Linux + xmonad + urxvt bundle and trying to resolve the conflict between xmonad and urxvt. Better to explain with shots: Firstly, open the terminal and get some full-length output. Secondly, create another window, which squeezes the first. And, finally, close it to find out that half of the output disappeared.

Sometimes it behaves correctly, sometimes not. Tried to find out why, but failed. Many thx in advance!


1 Answer 1


One solution is to run your commands within screen. Screen wraps lines while resizing, but in this case, running a shell inside a terminal multiplexer may seem a little unaesthetic.

The second solution is to use the following code in your .bashrc:

for (( i=1; i<=$LINES; i++ )); do echo; done; clear

If $LINES is undefined, then set LINES=$(tput lines).

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.