Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Tmux does not appear to work #20

Open
aykevl opened this issue Jul 29, 2023 · 0 comments
Open

Tmux does not appear to work #20

aykevl opened this issue Jul 29, 2023 · 0 comments

Comments

@aykevl
Copy link
Contributor

aykevl commented Jul 29, 2023

Tmux is listed as one of the verified terminals, but for me it doesn't actually work:

With a dark background:

$ ./src/misc/termbg/target/release/termbg 
Check terminal background color
  Term : Tmux
  Latency: 630.001µs
  Color: R=0, G=0, B=0
  Theme: Dark

And with a light background:

$ ./src/misc/termbg/target/release/termbg 
Check terminal background color
  Term : Tmux
  Latency: 1.319794ms
  Color: R=0, G=0, B=0
  Theme: Dark

In both cases the detection appears to be error-free, but the background is detected incorrectly as dark.

Outside tmux (in a plain Konsole window), the color is detected correctly:

~$ ./src/misc/termbg/target/release/termbg 
Check terminal background color
  Term : XtermCompatible
  Latency: 1.449628ms
  Color: R=0, G=0, B=0
  Theme: Dark

~$ ./src/misc/termbg/target/release/termbg
Check terminal background color
  Term : XtermCompatible
  Latency: 2.596755ms
  Color: R=ffff, G=ffff, B=ffff
  Theme: Light

Interestingly, the color is detected correctly inside screen:

~$ ./src/misc/termbg/target/release/termbg
Check terminal background color
  Term : Screen
  Latency: 891.835µs
  Color: R=ffff, G=ffff, B=ffff
  Theme: Light

~$ ./src/misc/termbg/target/release/termbg
Check terminal background color
  Term : Screen
  Latency: 867.376µs
  Color: R=0, G=0, B=0
  Theme: Dark

Note that the tmux color isn't even recognized when the terminal is explicitly set to a particular color from within tmux:

~$ tmux set window-style 'fg=#d0cfcc,bg=#171421'

~$ ./src/misc/termbg/target/release/termbg
Check terminal background color
  Term : Tmux
  Latency: 409.917µs
  Color: R=0, G=0, B=0
  Theme: Dark

~$ tmux set window-style 'fg=#171421,bg=#ffffff'

~$ ./src/misc/termbg/target/release/termbg
Check terminal background color
  Term : Tmux
  Latency: 669.626µs
  Color: R=0, G=0, B=0
  Theme: Dark

Related: tmux/tmux#1919

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant