reorder the initialization some more
this should happen in display_init
this isn't necessary
refactor
simplify
this abstraction isn't really necessary
also store these on the term object

it'll make it easier to see when they actually change, because the
events we watch for often come after the change already happens
move this to the pty backend initialization
handle window resizing
handle another escape sequence
fix threading issues
don't allow the window to shrink below one pixel

it causes an error if you try that