title: How does htop display work?
body: <p>I want to write a program that displays its output in the shell like htop does, as opposed to just running the program and using the watch command. I have looked through the htop source code and am still a little lost. Is there a output beyond tty in the shell that is used, or are all the htop panels custom and opening an output like that is not a native task for a shell like bash?</p>
  
  <p>Thanks.</p>