screen-users
[Top][All Lists]
Advanced

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

Re: prevent screen region clearing


From: Tavis Ormandy
Subject: Re: prevent screen region clearing
Date: Mon, 21 Dec 2020 10:30:46 -0800

On Mon, Dec 21, 2020 at 08:38:27AM -0800, Tavis Ormandy wrote:
> Hey, is there any way to prevent screen from clearing a region when the
> process exits?
> 

I came up with a solution, I don't think it's very pretty but it works.

GNU tail has a --pid option that waits for a process to exit, so my
screenrc has something like:

split -v
screen vim foo.txt
focus
screen shownotes foonotes.txt
focus

Where shownotes is a oneline shell script like this, adjust to taste:

#!/bin/bash
exec tail --sleep-interval=0.1 --lines=+0 --follow --pid=$(pgrep -P ${STY%%.*} 
-x vim) ${1}

Now when vim exits in the main region, the other region immediately quits.

If someone knows a less hacky solution, please let me know. Thought I'd
post this for anyone searching for a similar problem in future.

Tavis.

-- 
----------------------------
$ finger taviso@sdf.org
----------------------------------------------



reply via email to

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