The ncurses normally clears background and show widgets/windows.
I would like to make ncurses working like a helper for current session and it pops up window above current ssh session
The appearance will be look like the CMD.exe implementation (see picture)

Short answer: you cannot do this.
Long: curses applications are full-screen programs that clear the screen so that they know what is on the screen (so the curses library can optimize its output: use the least amount of work).
You could write a low-level application which uses its own rules, e.g., using the terminfo/termcap interface. Even if you link it with the ncurses library, that would not make it a curses application, but a terminfo (preferred) or termcap (long deprecated) application. See the ncurses FAQ Types of library users.
To make a terminfo application for the example shown, your application would (offhand, there are probably additional things to do):
setupterm.Depending on the terminal's capabilities, different schemes (different combinations of terminal capabilities) may be needed to clear the screen, draw the dialog, etc.
In drawing the dialog, you wouldn't be able to use any of the high-level curses calls. The python documentation does not really outline the low-level calls. To see that, read the ncurses documentation.
Some may suggest alternatives (I won't), but those have the same limitations which are due to the terminal capabilities.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With