bstaletic Guru
Joined: 05 Apr 2014 Posts: 344
|
Posted: Thu Oct 17, 2024 7:11 am Post subject: ncurses box not rendered properly in st with tmux |
|
|
Recently I have noticed that ncurses boxes, like in alsamixes or kernel's menuconfig use a wrong character for horizontal lines.
That's the kind of "box" ncurses displays. Everything else is working, so alsamixer is functional.
It's just very distracting.
I say I have noticed recently, but I don't open alsamixer or kernel menuconfig every day...
However, there was one significant change on my machine that I can think of. I've added -flto -fgraphite-identity to my CFLAGS in make.conf
On my machine the simplest ncurses box reproduces the problem: Code: | #include <ncurses.h>
int main() {
initscr();
refresh();
WINDOW *win = newwin(3, 10, 2, 2);
box(win, 0 , 0);
wrefresh(win);
getch();
endwin();
} |
On my system, the above displays Code: | ┌─qqqqqqq┐
│ │
└─qqqqqqq┘ |
I'm running this in x11-terms/st, running a tmux session, with TERM set to xterm-256color.
Any of the following fixes the problem:
- Changing to a different terminal, including tty2.
- Changing TERM to st-256color
- Not using tmux
So only if TERM=xterm-256color, inside st, inside xterm does the problem manifest.
Usually, I'd just change the tmux config to set st-256color, but that feels wrong and not setting it worked for so many years. |
|