3 ms·
Care to elaborate on the control codes over curses? I’m curious :]
by slicktux 5y ago
Care to elaborate on the control codes over curses?
I’m curious :]
- shakna 5y agoI 'maintain' a shell script/library that can do a lot of the basic things like color controls, control getch, move the screen cursor, etc. [0] Taking a peek under covers to see how easy it is. A couple printfs from whatever language is way way less overhead than bundling in the whole of curses. [0] https://git.sr.ht/~shakna/damned https://git.sr.ht/~shakna/damned
- gorgoiler 5y agoAt its simplest, manage screen state yourself and redraw it by moving the cursor and colouring with ANSI codes: https://gist.github.com/fnky/458719343aabd01cfb17a3a4f7296797 https://gist.github.com/fnky/458719343aabd01cfb17a3a4f729679... Turning the cursor on and off, 24 bit color, etc. A lot is possible though you potential sacrifice portability (which in 2021 translates to “don’t expect your stuff to render properly if your at the Linux console, and everywhere else it is fine.”)