Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
ncurses box not rendered properly in st with tmux
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Portage & Programming
View previous topic :: View next topic  
Author Message
bstaletic
Guru
Guru


Joined: 05 Apr 2014
Posts: 344

PostPosted: Thu Oct 17, 2024 7:11 am    Post subject: ncurses box not rendered properly in st with tmux Reply with quote

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.
Back to top
View user's profile Send private message
bstaletic
Guru
Guru


Joined: 05 Apr 2014
Posts: 344

PostPosted: Thu Oct 17, 2024 8:47 am    Post subject: Reply with quote

I've tried recompiling tmux, ncurses and st without -flto -fgraphite-identity.
Didn't help.

I'm running out of ideas...
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Portage & Programming All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum